Read

Trait Read 

Source
pub trait Read {
    type Error;

    // Required methods
    fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error>;
    fn read_exact(&mut self, buf: &mut [u8]) -> Result<(), Self::Error>;
}
Expand description

Emulates std::io::Read with a simplified interface for no_std environments.

Required Associated Types§

Required Methods§

Source

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

Pull some bytes from this source into the specified buffer, returning how many bytes were read.

Source

fn read_exact(&mut self, buf: &mut [u8]) -> Result<(), Self::Error>

Read the exact number of bytes required to fill buf.

Implementors§

Source§

impl<T> Read for T
where T: Read,