Trait OpError

Source
pub trait OpError: Sized {
    type V;

    // Required method
    fn op_err(self) -> Option<Self::V>;

    // 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

Required Methods§

Source

fn op_err(self) -> Option<Self::V>

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<V> OpError for Option<V>

Source§

type V = V

Source§

fn op_err(self) -> Self

Implementors§