pub trait TokenProcessor {
type Output;
// Required method
fn process<P: Prompter>(
&self,
input: &mut &[&TokenWithRange<'_>],
prompter: &P,
) -> TokenProcessorResult<Self::Output>;
// Provided methods
fn then<S>(self, second: S) -> SequentialProcessor<Self, S>
where Self: Sized,
S: TokenProcessor + Sized { ... }
fn map<F, O>(self, f: F) -> Mapped<Self, F>
where Self: Sized,
F: Fn(Self::Output) -> O { ... }
}Expand description
A processor of tokens in the BMS. An implementation takes control only one feature about definitions and placements such as WAVxx definition and its sound object.
Required Associated Types§
Required Methods§
Sourcefn process<P: Prompter>(
&self,
input: &mut &[&TokenWithRange<'_>],
prompter: &P,
) -> TokenProcessorResult<Self::Output>
fn process<P: Prompter>( &self, input: &mut &[&TokenWithRange<'_>], prompter: &P, ) -> TokenProcessorResult<Self::Output>
Processes commands by consuming all the stream input. It mutates input
Provided Methods§
Sourcefn then<S>(self, second: S) -> SequentialProcessor<Self, S>
fn then<S>(self, second: S) -> SequentialProcessor<Self, S>
Creates a processor SequentialProcessor which does self then second.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.