Trait lzss::Write[][src]

pub trait Write {
    type Output;
    type Error;
    fn write(&mut self, data: u8) -> Result<(), Self::Error>;
fn finish(self) -> Result<Self::Output, Self::Error>; }
Expand description

Trait for writing bytes.

Associated Types

The final output.

This will be often (), but for example the VecWriter returns the Vec.

Please see the example implementations.

The error which can happen during a write or finish operation.

Use Void when no error can be emitted.

Required methods

Write a byte.

Convert the writer into the output.

When the underlying structure requires a flush, call it in this routine.

Be aware that finish is not called when an error occurred.

Implementors