pub enum Selector<SelectionT> {
Any,
Specific(SelectionT),
}
Expand description
Selector.
Variants§
Implementations§
Source§impl<SelectionT> Selector<SelectionT>
impl<SelectionT> Selector<SelectionT>
Sourcepub fn select<'own>(
&'own self,
candidates: &'own [SelectionT],
) -> Vec<&'own SelectionT>where
SelectionT: Eq,
pub fn select<'own>(
&'own self,
candidates: &'own [SelectionT],
) -> Vec<&'own SelectionT>where
SelectionT: Eq,
Select from candidates.
If we are Any we will select all candidates. Otherwise we will select either one or none of the candidates.
Trait Implementations§
Source§impl<SelectionT> CacheWeight for Selector<SelectionT>where
SelectionT: CacheWeight,
impl<SelectionT> CacheWeight for Selector<SelectionT>where
SelectionT: CacheWeight,
Source§fn cache_weight(&self) -> usize
fn cache_weight(&self) -> usize
Cache weight as a byte count. Read more
Source§impl<SelectionT> IsSpecific for Selector<SelectionT>
impl<SelectionT> IsSpecific for Selector<SelectionT>
Source§fn is_specific(&self) -> bool
fn is_specific(&self) -> bool
True if specific.
impl<SelectionT: Eq> Eq for Selector<SelectionT>
Auto Trait Implementations§
impl<SelectionT> Freeze for Selector<SelectionT>where
SelectionT: Freeze,
impl<SelectionT> RefUnwindSafe for Selector<SelectionT>where
SelectionT: RefUnwindSafe,
impl<SelectionT> Send for Selector<SelectionT>where
SelectionT: Send,
impl<SelectionT> Sync for Selector<SelectionT>where
SelectionT: Sync,
impl<SelectionT> Unpin for Selector<SelectionT>where
SelectionT: Unpin,
impl<SelectionT> UnwindSafe for Selector<SelectionT>where
SelectionT: UnwindSafe,
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.