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§

source

fn to_tokens(&self, tokens: &mut TokenStream)

Equivalent to ToTokens::to_tokens

Provided Methods§

Implementations on Foreign Types§

source§

impl ToTokensError for Infallible

source§

fn to_tokens(&self, _: &mut TokenStream)

source§

impl ToTokensError for Error

Available on crate feature syn only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

Implementors§