Pure

Trait Pure 

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

A typeclass for types that can lift values into a context.

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

Required Methods§

Source

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

Lifts a value into the context.

§Type Signature

forall f a. Pure 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§