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 forcharmfn out of the box.
For #[munch] mod {..} user can provide custom implementation, to support custom types in output.
Required Methods§
fn into_token_stream(self) -> TokenStream
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".