pub enum Filter {
Id(TypedPredicate<Id>),
Type(TypedPredicate<String>),
Created(TypedPredicate<u64>),
LastUpdated(TypedPredicate<u64>),
Field(String, Predicate),
Edge(String, Box<Filter>),
IntoEdge(String),
}Expand description
Represents some filter to apply against an ent when searching through a database
Variants§
Id(TypedPredicate<Id>)
Filters by the ent’s id
Type(TypedPredicate<String>)
Filters by the ent’s type
Created(TypedPredicate<u64>)
Filters by the ent’s creation timestamp
LastUpdated(TypedPredicate<u64>)
Filters by the ent’s last updated timestamp
Field(String, Predicate)
Filters by an ent’s field
Edge(String, Box<Filter>)
Filters by an ent connected by an edge; not the same as
Filter::IntoEdge, which converts an ent to its edge’s ents
IntoEdge(String)
(Special case) Filters by converting an ent into the ents on its edge
Implementations§
Source§impl Filter
impl Filter
pub fn where_id<P: Into<TypedPredicate<Id>>>(p: P) -> Self
pub fn where_type<P: Into<TypedPredicate<String>>>(p: P) -> Self
pub fn where_created<P: Into<TypedPredicate<u64>>>(p: P) -> Self
pub fn where_last_updated<P: Into<TypedPredicate<u64>>>(p: P) -> Self
pub fn where_field<S: Into<String>, P: Into<Predicate>>(name: S, p: P) -> Self
pub fn where_edge<S: Into<String>, F: Into<Filter>>(name: S, filter: F) -> Self
pub fn where_into_edge<S: Into<String>>(name: S) -> Self
Trait Implementations§
Source§impl Extend<Filter> for Query
impl Extend<Filter> for Query
Source§fn extend<T: IntoIterator<Item = Filter>>(&mut self, iter: T)
fn extend<T: IntoIterator<Item = Filter>>(&mut self, iter: T)
Extends the query’s filters with the contents of the iterator
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one)Extends a collection with exactly one element.
Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one)Reserves capacity in a collection for the given number of additional elements. Read more
Auto Trait Implementations§
impl Freeze for Filter
impl !RefUnwindSafe for Filter
impl !Send for Filter
impl !Sync for Filter
impl Unpin for Filter
impl !UnwindSafe for Filter
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