pub trait Pass: Transformer {
type Argument: Parse;
// Required method
fn through(
&mut self,
input: TokenStream,
argument: Self::Argument,
) -> Result<TokenStream>;
}Expand description
A trait that represents a singular pass over an input token stream.
This is a stronger-typed alternative to the Transformer trait, which is obligated to be dyn-safe.
§Blanket Implementation
A blanket implementation for Transformer for all implementors of Pass is automatically performed.
It is advisable to use generic bounds of this type in respect to Transformer.
Required Associated Types§
Required Methods§
Sourcefn through(
&mut self,
input: TokenStream,
argument: Self::Argument,
) -> Result<TokenStream>
fn through( &mut self, input: TokenStream, argument: Self::Argument, ) -> Result<TokenStream>
Pass-through an input [token stream] with an appropiate source-parsable argument.