Trait embedded_hal::serial::Write
source · pub trait Write<Word: Copy = u8>: ErrorType {
// Required methods
fn write(&mut self, buffer: &[Word]) -> Result<(), Self::Error>;
fn flush(&mut self) -> Result<(), Self::Error>;
}
Expand description
Write half of a serial interface (blocking variant)
Required Methods§
sourcefn write(&mut self, buffer: &[Word]) -> Result<(), Self::Error>
fn write(&mut self, buffer: &[Word]) -> Result<(), Self::Error>
Writes a slice, blocking until everything has been written
An implementation can choose to buffer the write, returning Ok(())
after the complete slice has been written to a buffer, but before all
words have been sent via the serial interface. To make sure that
everything has been sent, call flush
after this function returns.