Trait tea_sdk::ResultExt

pub trait ResultExt {
    type Value;
    type Error;

    // Required method
    fn err_into<E>(self) -> Result<Self::Value, E>
       where E: From<Self::Error>;
}
Expand description

A helper trait to map the error variant of a Result to inferred type with From/Into

Required Associated Types§

type Value

type Error

Required Methods§

fn err_into<E>(self) -> Result<Self::Value, E>where E: From<Self::Error>,

Map the error variant of a Result to inferred type with From/Into

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

§

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

§

type Value = T

§

type Error = E

§

fn err_into<E2>(self) -> Result<<Result<T, E> as ResultExt>::Value, E2>where E2: From<E>,

Implementors§