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> { ... }
}
Expand description

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

Required methods

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

Provided methods

Attempt to convert a Self into a new TokenStream

Implementors