MonadicReturn

Trait MonadicReturn 

Source
pub trait MonadicReturn {
    type Inner;

    // Required method
    fn monadic_return(t: Self::Inner) -> Self;
}
Expand description

Satisfied by types that can be constructed from some inner types.

Required Associated Types§

Source

type Inner

The inner type.

Required Methods§

Source

fn monadic_return(t: Self::Inner) -> Self

Wraps a value of Self::Inner into a Self.

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.

Implementations on Foreign Types§

Source§

impl<T> MonadicReturn for Option<T>

Source§

type Inner = T

Source§

fn monadic_return(t: T) -> Self

Source§

impl<T, E> MonadicReturn for Result<T, E>

Source§

type Inner = T

Source§

fn monadic_return(t: T) -> Self

Implementors§

Source§

impl<T> MonadicReturn for Nondet<T>

Source§

type Inner = T

Source§

impl<T, E> MonadicReturn for NdResult<T, E>

Source§

type Inner = T