Expand description
§Predicate
Use enum to predicate something.
Just need to implement Predicate Trait with predicate-macros crate, support | and & operator.
Don’t implement traits by self.
How to work: https://github.com/Spxg/predicate/blob/master/how_to_work.png.
§Feature
- rc (default)
- arc
Enable Arc Feature:
[dependencies.predicate]
version = "0.1"
default-features = false
features = ["arc"]
Structs§
- OpUnit
OpUnit<T>
is a tree structure.- Predicate
Ret - Wrap
OpUnitRcType<T>
.
Enums§
- Operation
- Operation Type.
Traits§
- OpUnit
Trait OpUnitTrait
is used to get op unit.- Predicate
- Only need to impl
Predicate
withrules
method forT
ifT
has impl OpUnitTrait.
Type Aliases§
- OpUnit
RcType - A single-threaded reference-counting pointer. ‘Rc’ stands for ‘Reference Counted’. Enable by deafult or feature ‘rc’.