Skip to main content

CollectionExtract

Trait CollectionExtract 

Source
pub trait CollectionExtract<S>: Send + Sync {
    type Item;

    // Required method
    fn extract<'s>(&self, s: &'s S) -> &'s [Self::Item];

    // Provided methods
    fn contains(&self, _s: &S, _item: &Self::Item) -> bool { ... }
    fn change_source(&self) -> ChangeSource { ... }
}

Required Associated Types§

Required Methods§

Source

fn extract<'s>(&self, s: &'s S) -> &'s [Self::Item]

Provided Methods§

Source

fn contains(&self, _s: &S, _item: &Self::Item) -> bool

Source

fn change_source(&self) -> ChangeSource

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<S, A, E, F, Sc> CollectionExtract<S> for UniConstraintStream<S, A, E, F, Sc>
where S: Send + Sync + 'static, A: Clone + Send + Sync + 'static, E: CollectionExtract<S, Item = A>, F: UniFilter<S, A>, Sc: Score + 'static,

Source§

type Item = A

Source§

impl<S, A, F> CollectionExtract<S> for VecExtract<F>
where F: for<'a> Fn(&'a S) -> &'a Vec<A> + Send + Sync,

Source§

type Item = A

Source§

impl<S, A, F> CollectionExtract<S> for F
where F: for<'a> Fn(&'a S) -> &'a [A] + Send + Sync,

Source§

type Item = A