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 darling only.
impl ToTokensError for Error
Available on crate feature
darling only.fn to_tokens(&self, tokens: &mut TokenStream)
Source§impl ToTokensError for Error
Available on crate feature syn1 only.
impl ToTokensError for Error
Available on crate feature
syn1 only.fn to_tokens(&self, tokens: &mut TokenStream)
Source§impl ToTokensError for Error
Available on crate feature syn only.
impl ToTokensError for Error
Available on crate feature
syn only.