Trait ResultType

Source
pub trait ResultType {
    type ReturnType: SupportedReturnType;

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

A trait to handle either a SupportedReturnType or a Result

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>

Convert the return type into a Result

Implementations on Foreign Types§

Source§

impl ResultType for bool

Source§

impl ResultType for f32

Source§

impl ResultType for f64

Source§

impl ResultType for i32

Source§

impl ResultType for i64

Source§

impl ResultType for u32

Source§

impl ResultType for u64

Source§

impl ResultType for ()

Source§

impl ResultType for String

Source§

impl ResultType for Vec<u8>

Implementors§