pub trait Transform {
fn transform_buffer(
&mut self,
in_ptr: usize,
out_ptr: usize,
input: &[u8],
output: &mut [u8]
) -> usize;
}
Expand description
Trait used for transformation of the input. It works on buffers due to the memory consumption and performance reasons.
Required Methods
Transforms the input to the output. Most of the time it just copies the byte at index
in_ptr
from the input to the index out_ptr
of the output. The function also returns the
position of the first next writable byte in the output buffer, that is, one behind the last
written one.
Trait Implementations
sourceimpl From<TransformMode> for Box<dyn Transform>
impl From<TransformMode> for Box<dyn Transform>
sourcefn from(val: TransformMode) -> Self
fn from(val: TransformMode) -> Self
Converts to this type from the input type.