Trait MapReadFn

Source
pub trait MapReadFn {
    // Required method
    fn map_read(&mut self, buf: &mut [u8]);
}
Expand description

A trait for mapping data read from an underlying reader.

Required Methods§

Source

fn map_read(&mut self, buf: &mut [u8])

Applies a mapping function to the data read from the underlying reader. This function takes a mutable reference to a buffer and modifies it in place.

The length of the buffer is gauranteed to be equal to the capacity of the underlying buffer, until the last read operation, where it may be smaller.

Implementors§

Source§

impl<F> MapReadFn for F
where F: FnMut(&mut [u8]),