Trait Read

Source
pub trait Read {
    // Required methods
    fn read(&mut self, buf: &mut [u8]) -> Result<usize, Error>;
    fn can_read(&self) -> bool;
}

Required Methods§

Source

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

Read data from the device. Returns the number of bytes read.

Source

fn can_read(&self) -> bool

Returns true if the device is ready to read.

Implementors§