Type Alias manyhow::Result

source ·
pub type Result<T = TokenStream, E = Error> = Result<T, E>;
Expand description

An alias for Result suited for use with this crate

Aliased Type§

enum Result<T = TokenStream, E = Error> {
    Ok(T),
    Err(E),
}

Variants§

§1.0.0

Ok(T)

Contains the success value

§1.0.0

Err(E)

Contains the error value

Trait Implementations§

source§

impl<T: MacroOutput, E: ToTokensError + 'static> MacroOutput for Result<T, E>

source§

fn convert(self) -> Result<TokenStream, Error>

Handles conversion into a Result<TokenStream, Error>.
source§

impl<T, E: ToTokensError + 'static> ResultExt<T, E> for Result<T, E>

source§

fn context_with<C: ToTokensError + 'static>( self, error: impl FnOnce() -> C ) -> Result<T, Error>

If self is error, attaches another error, closure is only executed if the Result is Err
source§

fn attachment(self, label: &'static str, msg: impl Display) -> Result<T, E>
where E: Attachment,

If self is error, extend error message Read more
source§

fn context(self, error: impl ToTokensError + 'static) -> Result<T, Error>

If self is error, attaches another error