Skip to main content

ByteStepper

Trait ByteStepper 

Source
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§

Source

type Output

What a productive step yields: an image decode event, a demuxed packet.

Source

type Error

The stage’s error.

Required Methods§

Source

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.

Source

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".

Implementors§