Trait ResError

Source
pub trait ResError: Sized {
    type V;
    type E: Debug + Display + Send + Sync + 'static;

    // Required method
    fn res_err(self) -> Result<Self::V, Self::E>;

    // Provided methods
    fn e_str(self, s: &'static str) -> Result<Self::V> { ... }
    fn e_string(self, s: String) -> Result<Self::V> { ... }
}

Required Associated Types§

Source

type V

Source

type E: Debug + Display + Send + Sync + 'static

Required Methods§

Source

fn res_err(self) -> Result<Self::V, Self::E>

Provided Methods§

Source

fn e_str(self, s: &'static str) -> Result<Self::V>

Source

fn e_string(self, s: String) -> Result<Self::V>

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, E: Debug + Display + Sync + Send + 'static> ResError for Result<T, E>

Source§

type V = T

Source§

type E = E

Source§

fn res_err(self) -> Self

Implementors§