pub trait ByteStepper {
type Output;
type Error;
// Required methods
fn step(
&mut self,
input: Input<'_>,
pulse: Option<&dyn Pulse>,
) -> Result<Stepped<Self::Output>, Self::Error>;
fn requested(&self) -> &[InputRequest];
}Expand description
A stage that consumes bytes through the sans-I/O dialogue.
Required Associated Types§
Required Methods§
Sourcefn step(
&mut self,
input: Input<'_>,
pulse: Option<&dyn Pulse>,
) -> Result<Stepped<Self::Output>, Self::Error>
fn step( &mut self, input: Input<'_>, pulse: Option<&dyn Pulse>, ) -> Result<Stepped<Self::Output>, Self::Error>
Take a prefix of input and report what happened. None adds no
per-call control; any control retained by the stage remains active.
Sourcefn requested(&self) -> &[InputRequest]
fn requested(&self) -> &[InputRequest]
What the stage needs next, after a Step::Need. Never empty then.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".