pub enum Predicate<_D: Domain = IOValue> {
Selector(Selector<_D>),
Not {
pred: Box<Predicate<_D>>,
},
Or {
preds: Vec<Predicate<_D>>,
},
And {
preds: Vec<Predicate<_D>>,
},
}Variants§
Implementations§
Source§impl Predicate
impl Predicate
pub fn compile(&self) -> Result<CompiledPredicate, CompilationError>
pub fn exec( &self, ctxt: &mut Context<'_>, value: &IOValue, ) -> Result<bool, CompilationError>
Trait Implementations§
Source§impl<_D: Domain> Deserialize<_D> for Predicate<_D>
impl<_D: Domain> Deserialize<_D> for Predicate<_D>
fn deserialize<'de, R: Reader<'de> + ?Sized, Dec: DomainDecode<_D>>( r: &mut R, _dec: &mut Dec, ) -> ReaderResult<Self>
Source§impl<_D: Ord + Domain> Ord for Predicate<_D>
impl<_D: Ord + Domain> Ord for Predicate<_D>
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<_D: PartialOrd + Domain> PartialOrd for Predicate<_D>
impl<_D: PartialOrd + Domain> PartialOrd for Predicate<_D>
impl<_D: Eq + Domain> Eq for Predicate<_D>
impl<_D: Domain> StructuralPartialEq for Predicate<_D>
Auto Trait Implementations§
impl<_D> Freeze for Predicate<_D>
impl<_D = IOValue> !RefUnwindSafe for Predicate<_D>
impl<_D> Send for Predicate<_D>
impl<_D> Sync for Predicate<_D>
impl<_D> Unpin for Predicate<_D>
impl<_D = IOValue> !UnwindSafe for Predicate<_D>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more