[][src]Trait streamcatcher::Transform

pub trait Transform<TInput: Read> {
    fn transform_read(
        &mut self,
        src: &mut TInput,
        buf: &mut [u8]
    ) -> IoResult<TransformPosition>; }

Allows an input bytestream to be modified before it is stored.

Must be implemented alongside NeedsBytes in a functional transform.

Required methods

fn transform_read(
    &mut self,
    src: &mut TInput,
    buf: &mut [u8]
) -> IoResult<TransformPosition>

Data transform, given access to the underlying Read object and the destination buffer.

Transforms are free to make no change to buf without marking the stream as finalised: see TransformPosition for the semantics.

Loading content...

Implementors

impl<T: Read> Transform<T> for Identity[src]

Loading content...