Pointed

Trait Pointed 

Source
pub trait Pointed: Kind0L1T {
    // Required method
    fn pure<ClonableFnBrand: ClonableFn, A: Clone>(a: A) -> Apply0L1T<Self, A>;
}
Expand description

A type class for types that can lift values into a context.

Pointed provides the ability to lift a value into a context without adding any additional structure or effects.

Required Methods§

Source

fn pure<ClonableFnBrand: ClonableFn, A: Clone>(a: A) -> Apply0L1T<Self, A>

Lifts a value into the context.

§Type Signature

forall a. Pointed f => a -> f a

§Parameters
  • a: A value to be lifted into the context.
§Returns

The value wrapped in the context.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl Pointed for IdentityBrand

Source§

impl Pointed for OptionBrand

Source§

impl Pointed for VecBrand

Source§

impl<E> Pointed for ResultWithErrBrand<E>

Source§

impl<First> Pointed for PairWithFirstBrand<First>
where for<'a> Apply1L0T<'a, First>: Monoid<'a>, for<'a> First: Monoid1L0T<Output<'a> = First> + Clone,

Source§

impl<Second> Pointed for PairWithSecondBrand<Second>
where for<'a> Apply1L0T<'a, Second>: Monoid<'a>, for<'a> Second: Monoid1L0T<Output<'a> = Second> + Clone,

Source§

impl<T> Pointed for ResultWithOkBrand<T>