Trait wasm_bindgen_backend::TryToTokens[][src]

pub trait TryToTokens {
    fn try_to_tokens(&self, tokens: &mut TokenStream) -> Result<(), Diagnostic>;

    fn try_to_token_stream(&self) -> Result<TokenStream, Diagnostic> { ... }
}

A trait for converting AST structs into Tokens and adding them to a TokenStream, or providing a diagnostic if conversion fails.

Required methods

fn try_to_tokens(&self, tokens: &mut TokenStream) -> Result<(), Diagnostic>[src]

Attempt to convert a Self into tokens and add it to the TokenStream

Loading content...

Provided methods

fn try_to_token_stream(&self) -> Result<TokenStream, Diagnostic>[src]

Attempt to convert a Self into a new TokenStream

Loading content...

Implementors

Loading content...