Trait FilterableWithContext

Source
pub trait FilterableWithContext<'a, A: 'a>: Sized {
    type Meta: Meta<'a, Self>;

    // Required method
    fn get_meta(access: A) -> Self::Meta;
}
Available on crate feature filter only.
Expand description

Something that can describe how to filter itself if a context type is provided.

Something implementing this trait can provide a Meta which describes its supported fields and their operators, but only when a context object is provided. Note that the provided context object may be stored within the Meta type, which is the origin of the lifetime parameter.

This can be derived via the FilterableWithPersianRug derive macro for the case of a persian-rug type.

Required Associated Types§

Source

type Meta: Meta<'a, Self>

Meta is the type which can describe our fields and their operators.

Required Methods§

Source

fn get_meta(access: A) -> Self::Meta

get_meta produces an instance of our Meta type.

Here access is some context object that we need in order to provide filters for our type.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<'a, A, C, T> FilterableWithContext<'a, A> for Proxy<T>
where T: FilterableWithContext<'a, A> + Contextual<Context = C> + Contextual<Context = C>, A: Accessor<Context = C> + 'a, C: Context + Owner<T>,

Source§

type Meta = ProxyMeta<A>

Available on crate feature filter only.
Source§

fn get_meta(access: A) -> Self::Meta

Available on crate feature filter only.
Source§

impl<'a, A, T> FilterableWithContext<'a, A> for Option<T>
where T: FilterableWithContext<'a, A>, A: 'a + Clone,

Source§

type Meta = IterableMetaWithContext<A>

Source§

fn get_meta(access: A) -> Self::Meta

Source§

impl<'a, A, T> FilterableWithContext<'a, A> for Vec<T>
where T: FilterableWithContext<'a, A>, A: 'a + Clone,

Source§

type Meta = IterableMetaWithContext<A>

Source§

fn get_meta(access: A) -> Self::Meta

Implementors§