Skip to main content

IntoTokenStream

Trait IntoTokenStream 

Source
pub trait IntoTokenStream {
    // Required method
    fn into_token_stream(self) -> TokenStream;
}
Expand description

Convert specific type into TokenStream.

In token-goblin it is used to convert output types of token-goblin charms into TokenStream. We provide default implementations for:

  • String, TokenStream, () - so them can be used as output for charm fn out of the box.

For #[munch] mod {..} user can provide custom implementation, to support custom types in output.

Required Methods§

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl IntoTokenStream for ()

Source§

impl IntoTokenStream for String

Implementors§