Trait streamcatcher::Transform [−][src]
pub trait Transform<TInput: Read> {
fn transform_read(
&mut self,
src: &mut TInput,
buf: &mut [u8]
) -> IoResult<TransformPosition>;
}
Expand description
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>
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.