Struct LabelFilter

Source
pub struct LabelFilter<L> { /* private fields */ }

Implementations§

Source§

impl<L> LabelFilter<L>
where L: Eq + Send + 'static,

Source

pub fn new(label: L) -> Self

Source

pub fn predicate<P>(p: P) -> Self
where P: Fn(&L) -> bool + Send + 'static,

Source

pub fn accept_all() -> Self

Source

pub fn accept_none() -> Self

Source

pub fn accept_another(&mut self, label: L)

Source

pub fn accepts(&self, label: &L) -> bool

Trait Implementations§

Source§

impl<L> Default for LabelFilter<L>
where L: Eq + Send + 'static,

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<L> From<(L, L)> for LabelFilter<L>
where L: Eq + Send + 'static,

Source§

fn from(v: (L, L)) -> Self

Converts to this type from the input type.
Source§

impl<L> From<(L, L, L)> for LabelFilter<L>
where L: Eq + Send + 'static,

Source§

fn from(v: (L, L, L)) -> Self

Converts to this type from the input type.
Source§

impl<L> From<(L, L, L, L)> for LabelFilter<L>
where L: Eq + Send + 'static,

Source§

fn from(v: (L, L, L, L)) -> Self

Converts to this type from the input type.
Source§

impl<L> From<(L, L, L, L, L)> for LabelFilter<L>
where L: Eq + Send + 'static,

Source§

fn from(v: (L, L, L, L, L)) -> Self

Converts to this type from the input type.
Source§

impl<L> From<AcceptAllLabels> for LabelFilter<L>
where L: Eq + Send + 'static,

Source§

fn from(_v: AcceptAllLabels) -> Self

Converts to this type from the input type.
Source§

impl<L> From<AcceptNoLabel> for LabelFilter<L>
where L: Eq + Send + 'static,

Source§

fn from(_v: AcceptNoLabel) -> Self

Converts to this type from the input type.
Source§

impl<L> From<AcceptOneLabel<L>> for LabelFilter<L>
where L: Eq + Send + 'static,

Source§

fn from(v: AcceptOneLabel<L>) -> Self

Converts to this type from the input type.
Source§

impl<LL> From<L<LL>> for LabelFilter<LL>
where LL: Eq + Send + 'static,

Source§

fn from(v: L<LL>) -> Self

Converts to this type from the input type.
Source§

impl<L> From<L> for LabelFilter<L>
where L: Eq + Send + 'static,

Source§

fn from(v: L) -> Self

Converts to this type from the input type.
Source§

impl<L, P> From<LP<P>> for LabelFilter<L>
where L: Eq + Send + 'static, P: Fn(&L) -> bool + Send + 'static,

Source§

fn from(v: LP<P>) -> Self

Converts to this type from the input type.
Source§

impl<L, P> From<LabelPredicate<P>> for LabelFilter<L>
where L: Eq + Send + 'static, P: Fn(&L) -> bool + Send + 'static,

Source§

fn from(v: LabelPredicate<P>) -> Self

Converts to this type from the input type.
Source§

impl<L> From<Vec<L>> for LabelFilter<L>
where L: Eq + Send + 'static,

Source§

fn from(v: Vec<L>) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<L> Freeze for LabelFilter<L>
where L: Freeze,

§

impl<L> !RefUnwindSafe for LabelFilter<L>

§

impl<L> Send for LabelFilter<L>
where L: Send,

§

impl<L> !Sync for LabelFilter<L>

§

impl<L> Unpin for LabelFilter<L>
where L: Unpin,

§

impl<L> !UnwindSafe for LabelFilter<L>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<!> for T

Source§

fn from(t: !) -> T

Converts to this type from the input type.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V