Documentation ¶
Overview ¶
Package predicate provides breakable predicate builders
Index ¶
- type Predicate
- func Always[T any](v bool) Predicate[T]
- func And[T any](p1, p2 Predicate[T]) Predicate[T]
- func Eq[T comparable](v T) Predicate[T]
- func Never[T any](v bool) Predicate[T]
- func Not[T any](p Predicate[T]) Predicate[T]
- func Of[T comparable](predicate func(T) bool) Predicate[T]
- func Or[T any](p1, p2 Predicate[T]) Predicate[T]
- func Union[T any](predicates ...Predicate[T]) Predicate[T]
- func Wrap[T any](predicate func(T) bool) Predicate[T]
- func Xor[T any](p1, p2 Predicate[T]) Predicate[T]
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Predicate ¶
Predicate tests value (converts to true or false) or aborts by an error.
func Of ¶
func Of[T comparable](predicate func(T) bool) Predicate[T]
Of breakable Predicate constructor
Directories ¶
Path | Synopsis |
---|---|
Package always provides constant predicate implementations
|
Package always provides constant predicate implementations |
Package eq provides predicate builder short aliases
|
Package eq provides predicate builder short aliases |
Package exclude provides predicate builders
|
Package exclude provides predicate builders |
Package less provides predicate builders
|
Package less provides predicate builders |
Package more provides predicate builders
|
Package more provides predicate builders |
Package not provides negalive predicate builders like 'not equals to'
|
Package not provides negalive predicate builders like 'not equals to' |
Package one provides predicate builders
|
Package one provides predicate builders |
Click to show internal directories.
Click to hide internal directories.