pub struct Predicate<D, Scope> { /* private fields */ }Expand description
A condition whose scope requirement has already been discharged, so a
runtime-length collection of them can be built and passed around. An
Expr carries the tables it references in its type, which is what makes
vec![users_cond, orders_cond] fail to unify; predicate trades that
tag for a proof against one concrete scope.
Implementations§
Source§impl<D, Scope> Predicate<D, Scope>
impl<D, Scope> Predicate<D, Scope>
Sourcepub fn any_of(preds: impl IntoIterator<Item = Predicate<D, Scope>>) -> Self
pub fn any_of(preds: impl IntoIterator<Item = Predicate<D, Scope>>) -> Self
True when any of them is. expr::any_of combines conditions that
reference the same tables; this one combines conditions whose scope
requirement is already discharged, which is what lets a search form
OR together conditions from different tables.
Sourcepub fn all_of(preds: impl IntoIterator<Item = Predicate<D, Scope>>) -> Self
pub fn all_of(preds: impl IntoIterator<Item = Predicate<D, Scope>>) -> Self
True when all of them are — the AND to any_of’s OR, so a group of
them can be nested inside one.
Trait Implementations§
impl<D, Scope> Condition<D, Scope, ()> for Predicate<D, Scope>
Auto Trait Implementations§
impl<D, Scope> Freeze for Predicate<D, Scope>
impl<D, Scope> RefUnwindSafe for Predicate<D, Scope>
impl<D, Scope> Send for Predicate<D, Scope>
impl<D, Scope> Sync for Predicate<D, Scope>
impl<D, Scope> Unpin for Predicate<D, Scope>
impl<D, Scope> UnsafeUnpin for Predicate<D, Scope>
impl<D, Scope> UnwindSafe for Predicate<D, Scope>
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