pub trait Pure<A> {
// Required method
fn pure(value: A) -> Self;
}Expand description
Pure lets you construct a value of type F<A> from a single value of
A.
For instance:
Option::pure(5)returnsSome(5).Result::pure(5)returnsOk(5).Vec::pure(5)returnsvec![5].
Required Methods§
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.