Trait tbot::predicates::PredicateBooleanOperations[][src]

pub trait PredicateBooleanOperations<C, F>: Fn(Arc<C>) -> F where
    F: Future<Output = bool> + Send,
    C: Send + Sync + 'static,
    Self: Sized + Send + Sync + 'static, 
{ fn and<P, PF>(
        self,
        other: P
    ) -> Box<dyn Fn(Arc<C>) -> BoxFuture<'static, bool> + Send + Sync + 'static>
    where
        P: PredicateBooleanOperations<C, PF> + 'static,
        PF: Future<Output = bool> + Send
, { ... }
fn or<P, PF>(
        self,
        other: P
    ) -> Box<dyn Fn(Arc<C>) -> BoxFuture<'static, bool> + Send + Sync + 'static>
    where
        P: PredicateBooleanOperations<C, PF> + 'static,
        PF: Future<Output = bool> + Send
, { ... }
fn xor<P, PF>(
        self,
        other: P
    ) -> Box<dyn Fn(Arc<C>) -> BoxFuture<'static, bool> + Send + Sync + 'static>
    where
        P: PredicateBooleanOperations<C, PF> + 'static,
        PF: Future<Output = bool> + Send
, { ... }
fn not(
        self
    ) -> Box<dyn Fn(Arc<C>) -> BoxFuture<'static, bool> + Send + Sync + 'static> { ... } }

Boolean operations on predicates.

Provided methods

fn and<P, PF>(
    self,
    other: P
) -> Box<dyn Fn(Arc<C>) -> BoxFuture<'static, bool> + Send + Sync + 'static> where
    P: PredicateBooleanOperations<C, PF> + 'static,
    PF: Future<Output = bool> + Send
[src]

self(..).await && other(..).await

fn or<P, PF>(
    self,
    other: P
) -> Box<dyn Fn(Arc<C>) -> BoxFuture<'static, bool> + Send + Sync + 'static> where
    P: PredicateBooleanOperations<C, PF> + 'static,
    PF: Future<Output = bool> + Send
[src]

self(..).await || other(..).await

fn xor<P, PF>(
    self,
    other: P
) -> Box<dyn Fn(Arc<C>) -> BoxFuture<'static, bool> + Send + Sync + 'static> where
    P: PredicateBooleanOperations<C, PF> + 'static,
    PF: Future<Output = bool> + Send
[src]

self(..).await != other(..).await

fn not(
    self
) -> Box<dyn Fn(Arc<C>) -> BoxFuture<'static, bool> + Send + Sync + 'static>
[src]

!self(..).await

Loading content...

Implementors

impl<C, F, T> PredicateBooleanOperations<C, F> for T where
    T: Fn(Arc<C>) -> F + Sized + Send + Sync + 'static,
    F: Future<Output = bool> + Send,
    C: Send + Sync + 'static, 
[src]

Loading content...