Write

Trait Write 

Source
pub trait Write {
    // Required method
    fn write_all(&mut self, buf: &[u8]) -> Result<Option<()>, Error>;

    // Provided method
    fn write_byte(&mut self, value: u8) -> Result<Option<()>, Error> { ... }
}
Expand description

Write operations.

Required Methods§

Source

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

Writes the entire buffer to the I/O port.

§Errors

Data when corrupted data has been detected. Read when the read I/O fails with the serial port. Write when the write I/O fails with the serial port.

Provided Methods§

Source

fn write_byte(&mut self, value: u8) -> Result<Option<()>, Error>

Writes a single byte to the I/O port.

§Errors

Data when corrupted data has been detected. Read when the read I/O fails with the serial port. Write when the write I/O fails with the serial port.

Implementors§

Source§

impl<W> Write for W
where W: Write,