Crate predicate[−][src]
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<T>
is a tree structure.
Wrap OpUnitRcType<T>
.
Enums
Operation Type.
Traits
OpUnitTrait
is used to get op unit.
Only need to impl Predicate
with rules
method for T
if T
has impl OpUnitTrait.
Type Definitions
A single-threaded reference-counting pointer. ‘Rc’ stands for ‘Reference Counted’. Enable by deafult or feature ‘rc’.