Trait manyhow::ToTokensError
source · pub trait ToTokensError: Debug {
// Required method
fn to_tokens(&self, tokens: &mut TokenStream);
// Provided methods
fn to_token_stream(&self) -> TokenStream { ... }
fn into_token_stream(self) -> TokenStream
where Self: Sized { ... }
}
Expand description
Error that can be converted to a TokenStream
required to be used with
MacroOutput
This trait is equivalent to ToTokens
.
Required Methods§
sourcefn to_tokens(&self, tokens: &mut TokenStream)
fn to_tokens(&self, tokens: &mut TokenStream)
Equivalent to ToTokens::to_tokens
Provided Methods§
sourcefn to_token_stream(&self) -> TokenStream
fn to_token_stream(&self) -> TokenStream
Equivalent to ToTokens::to_token_stream
sourcefn into_token_stream(self) -> TokenStreamwhere
Self: Sized,
fn into_token_stream(self) -> TokenStreamwhere
Self: Sized,
Equivalent to ToTokens::into_token_stream
Implementations on Foreign Types§
source§impl ToTokensError for Infallible
impl ToTokensError for Infallible
fn to_tokens(&self, _: &mut TokenStream)
source§impl ToTokensError for Error
Available on crate feature syn
only.
impl ToTokensError for Error
Available on crate feature
syn
only.