[][src]Enum holochain_persistence_api::eav::query::EavFilter

pub enum EavFilter<'a, T: 'a + Eq> {
    Exact(T),
    Predicate(Box<dyn Fn(T) -> bool + 'a>),
}

Represents a filter type which takes in a function to match on

Variants

Exact(T)
Predicate(Box<dyn Fn(T) -> bool + 'a>)

Methods

impl<'a, T: 'a + Eq> EavFilter<'a, T>[src]

pub fn single(val: T) -> Self[src]

pub fn multiple(vals: Vec<T>) -> Self[src]

pub fn predicate<F>(predicate: F) -> Self where
    F: Fn(T) -> bool + 'a, 
[src]

pub fn check(&self, b: T) -> bool[src]

Trait Implementations

impl<'a, T: Eq> From<Option<T>> for EavFilter<'a, T>[src]

impl<'a, T: Eq> From<Vec<T>> for EavFilter<'a, T>[src]

impl<'a, T: Eq> Default for EavFilter<'a, T>[src]

Auto Trait Implementations

impl<'a, T> !Send for EavFilter<'a, T>

impl<'a, T> !Sync for EavFilter<'a, T>

impl<'a, T> Unpin for EavFilter<'a, T> where
    T: Unpin

impl<'a, T> !UnwindSafe for EavFilter<'a, T>

impl<'a, T> !RefUnwindSafe for EavFilter<'a, T>

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self