pub trait Mapper: Send {
// Required method
fn map(&mut self, bytes: &[u8]) -> Bytes;
}Expand description
Generic byte-stream transformation.
&mut self because some future mappers (e.g. one that normalises
\r\n straddling a chunk boundary) will keep state across calls.
The line-ending mapper is stateless but pays the same signature cost.