Trait tbot::predicates::PredicateBooleanOperations
source · pub trait PredicateBooleanOperations<C, F>: Fn(Arc<C>) -> Fwhere
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> { ... }
}
Expand description
Boolean operations on predicates.
Provided Methods§
sourcefn 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 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,
self(..).await && other(..).await
sourcefn 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 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,
self(..).await || other(..).await