Skip to main content

Not

Struct Not 

Source
pub struct Not<P> { /* private fields */ }
Expand description

Inverts a predicate result.

  • Cacheable becomes NonCacheable
  • NonCacheable becomes Cacheable

Implementations§

Source§

impl<P> Not<P>

Source

pub fn new(predicate: P) -> Self

Creates a new Not combinator wrapping the given predicate.

Trait Implementations§

Source§

impl<P: Debug> Debug for Not<P>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<P> Predicate for Not<P>
where P: Predicate + Send + Sync, P::Subject: Send,

Source§

type Subject = <P as Predicate>::Subject

The type being evaluated by this predicate.
Source§

fn check<'life0, 'async_trait>( &'life0 self, subject: Self::Subject, ) -> Pin<Box<dyn Future<Output = PredicateResult<Self::Subject>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Evaluate whether the subject should be cached. Read more

Auto Trait Implementations§

§

impl<P> Freeze for Not<P>
where P: Freeze,

§

impl<P> RefUnwindSafe for Not<P>
where P: RefUnwindSafe,

§

impl<P> Send for Not<P>
where P: Send,

§

impl<P> Sync for Not<P>
where P: Sync,

§

impl<P> Unpin for Not<P>
where P: Unpin,

§

impl<P> UnwindSafe for Not<P>
where P: UnwindSafe,

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<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> PredicateExt for T
where T: Predicate,

Source§

fn and<R>(self, right: R) -> And<Self, R>
where R: Predicate<Subject = Self::Subject>,

Combines this predicate with another using AND logic. Read more
Source§

fn or<R>(self, right: R) -> Or<Self, R>
where R: Predicate<Subject = Self::Subject>,

Combines this predicate with another using OR logic. Read more
Source§

fn not(self) -> Not<Self>

Inverts this predicate’s result. Read more
Source§

fn boxed(self) -> Box<dyn Predicate<Subject = Self::Subject> + Send + Sync>
where Self: Send + Sync + 'static,

Boxes this predicate into a trait object. Read more
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.