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§
Trait Implementations§
source§impl<T: MacroOutput, E: ToTokensError + 'static> MacroOutput for Result<T, E>
impl<T: MacroOutput, E: ToTokensError + 'static> MacroOutput for Result<T, E>
source§fn convert(self) -> Result<TokenStream, Error>
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>
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>
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,
fn attachment(self, label: &'static str, msg: impl Display) -> Result<T, E>where
E: Attachment,
If self is error, extend error message Read more