pub trait OkOrInternalError {
    type S;

    // Required method
    fn ok_or_internal_error<M: AsRef<str>>(
        self,
        reason: M
    ) -> Result<Self::S, CommonError>;
}
Expand description

Trait to map an error to an Internal Error code

Required Associated Types§

source

type S

Required Methods§

source

fn ok_or_internal_error<M: AsRef<str>>( self, reason: M ) -> Result<Self::S, CommonError>

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<T> OkOrInternalError for Option<T>

§

type S = T

source§

fn ok_or_internal_error<M: AsRef<str>>( self, reason: M ) -> Result<T, CommonError>

source§

impl<T, E> OkOrInternalError for Result<T, E>
where E: Display,

§

type S = T

source§

fn ok_or_internal_error<M: AsRef<str>>( self, reason: M ) -> Result<T, CommonError>

Implementors§