Read

Trait Read 

Source
pub trait Read {
    // Required method
    fn read(&mut self, buf: &mut [u8]) -> Result<usize>;
}
Expand description

Minimal read abstraction used by this crate in both std and no‑std modes.

Required Methods§

Source

fn read(&mut self, buf: &mut [u8]) -> Result<usize>

Fills buf with bytes from the underlying source, returning the number of bytes read or an error if no data is available.

Implementors§

Source§

impl<T: AsRef<[u8]>> Read for Cursor<T>