pub trait SelfRustTokenize {
// Required method
fn append_to_token_stream(&self, token_stream: &mut TokenStream);
// Provided method
fn to_tokens(&self) -> TokenStream { ... }
}
Expand description
An item which can be turned into tokens that match its original construction
note: this is implmented for Box<T>
and Vec<T>
which while staisfies PartialEq it loses pointer information
Required Methods§
fn append_to_token_stream(&self, token_stream: &mut TokenStream)
Provided Methods§
Sourcefn to_tokens(&self) -> TokenStream
fn to_tokens(&self) -> TokenStream
Returns the tokens used to construct self