ResultType

Trait ResultType 

Source
pub trait ResultType<E: Debug> {
    type ReturnType: SupportedReturnType;

    // Required method
    fn into_result(self) -> Result<Self::ReturnType, E>;
}
Expand description

A trait to handle either a SupportedReturnType or a Result<impl SupportedReturnType>

Required Associated Types§

Source

type ReturnType: SupportedReturnType

The return type of the supported return value

Required Methods§

Source

fn into_result(self) -> Result<Self::ReturnType, E>

Convert the return type into a Result<impl SupportedReturnType>

Implementations on Foreign Types§

Source§

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

Implementors§

Source§

impl<T, E> ResultType<E> for T