pub enum Expression<Field> {
Field(Field),
And {
and: (Box<Self>, Box<Self>),
},
Or {
or: (Box<Self>, Box<Self>),
},
Not {
not: Box<Self>,
},
Empty,
}Variants§
Implementations§
Source§impl<Field> Expression<Field>
impl<Field> Expression<Field>
pub fn evaluate<R, V, E>(&self, resolver: &R) -> Result<V, E>where
R: FieldResolver<V, FieldType = Field, Error = E>,
V: BitAndAssign + BitOrAssign + Not<Output = V> + Sizeable,
Trait Implementations§
Source§impl<Field: Clone> Clone for Expression<Field>
impl<Field: Clone> Clone for Expression<Field>
Source§fn clone(&self) -> Expression<Field>
fn clone(&self) -> Expression<Field>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<Field: Debug> Debug for Expression<Field>
impl<Field: Debug> Debug for Expression<Field>
Source§impl<Field> Default for Expression<Field>
impl<Field> Default for Expression<Field>
Source§impl<'de, Field> Deserialize<'de> for Expression<Field>where
Field: Deserialize<'de>,
impl<'de, Field> Deserialize<'de> for Expression<Field>where
Field: Deserialize<'de>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<Field: Hash> Hash for Expression<Field>
impl<Field: Hash> Hash for Expression<Field>
Source§impl<Field: PartialEq> PartialEq for Expression<Field>
impl<Field: PartialEq> PartialEq for Expression<Field>
Source§impl<Field> Serialize for Expression<Field>where
Field: Serialize,
impl<Field> Serialize for Expression<Field>where
Field: Serialize,
impl<Field: Eq> Eq for Expression<Field>
impl<Field> StructuralPartialEq for Expression<Field>
Auto Trait Implementations§
impl<Field> Freeze for Expression<Field>where
Field: Freeze,
impl<Field> RefUnwindSafe for Expression<Field>where
Field: RefUnwindSafe,
impl<Field> Send for Expression<Field>where
Field: Send,
impl<Field> Sync for Expression<Field>where
Field: Sync,
impl<Field> Unpin for Expression<Field>where
Field: Unpin,
impl<Field> UnwindSafe for Expression<Field>where
Field: UnwindSafe,
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