Skip to main content

Conclude

Trait Conclude 

Source
pub trait Conclude: Decide {
    // Required method
    fn conclude<A>(f: impl Fn(A) -> Infallible + 'static) -> Self::Of<A>
       where A: 'static;
}
Expand description

Conclude: the contravariant analogue of Plus.

Adds a conclude operation (the identity for choose). conclude takes a function A -> Infallible, witnessing that A is uninhabited — so the resulting predicate is vacuously true.

Laws:

  • Left identity: choose(f, conclude(absurd), fa) ≈ contramap(from_right . f, fa)
  • Right identity: choose(f, fa, conclude(absurd)) ≈ contramap(from_left . f, fa)

Required Methods§

Source

fn conclude<A>(f: impl Fn(A) -> Infallible + 'static) -> Self::Of<A>
where A: 'static,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§