Skip to main content

PredicateF

Struct PredicateF 

Source
pub struct PredicateF;
Expand description

Type constructor for predicates: Of<A> = Box<dyn Fn(A) -> bool>.

Trait Implementations§

Source§

impl Conclude for PredicateF

Source§

fn conclude<A>(_f: impl Fn(A) -> Infallible + 'static) -> Box<dyn Fn(A) -> bool>
where A: 'static,

Source§

impl Contravariant for PredicateF

Available on crate features alloc or std only.
Source§

fn contramap<A, B>( fa: <PredicateF as HKT>::Of<A>, f: impl Fn(B) -> A + 'static, ) -> <PredicateF as HKT>::Of<B>
where A: 'static,

Source§

impl Decide for PredicateF

Source§

fn choose<A, B, C>( f: impl Fn(C) -> Result<A, B> + 'static, fa: Box<dyn Fn(A) -> bool>, fb: Box<dyn Fn(B) -> bool>, ) -> Box<dyn Fn(C) -> bool>
where A: 'static, B: 'static, C: 'static,

Source§

impl Divide for PredicateF

Source§

fn divide<A, B, C>( f: impl Fn(C) -> (A, B) + 'static, fa: Box<dyn Fn(A) -> bool>, fb: Box<dyn Fn(B) -> bool>, ) -> Box<dyn Fn(C) -> bool>
where A: 'static, B: 'static, C: 'static,

Source§

impl Divisible for PredicateF

Source§

fn conquer<A>() -> Box<dyn Fn(A) -> bool>
where A: 'static,

Source§

impl HKT for PredicateF

Available on crate features alloc or std only.
Source§

type Of<T> = Box<dyn Fn(T) -> bool>

Auto Trait Implementations§

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, 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.