[][src]Trait perde_core::error::Convert

pub trait Convert<T> {
    fn de<E>(self) -> Result<T, E>
    where
        E: Error,
        Self: Sized
;
fn ser<E>(self) -> Result<T, E>
    where
        E: Error,
        Self: Sized
;
fn restore(self) -> Option<T>
    where
        Self: Sized
;
fn context<C>(self, context: C) -> Result<T>
    where
        C: Display + Send + Sync + 'static
;
fn with_context<C, F>(self, f: F) -> Result<T>
    where
        C: Display + Send + Sync + 'static,
        F: FnOnce() -> C
; }

Required methods

fn de<E>(self) -> Result<T, E> where
    E: Error,
    Self: Sized

fn ser<E>(self) -> Result<T, E> where
    E: Error,
    Self: Sized

fn restore(self) -> Option<T> where
    Self: Sized

fn context<C>(self, context: C) -> Result<T> where
    C: Display + Send + Sync + 'static, 

fn with_context<C, F>(self, f: F) -> Result<T> where
    C: Display + Send + Sync + 'static,
    F: FnOnce() -> C, 

Loading content...

Implementors

impl<T> Convert<T> for Result<T>[src]

Loading content...