[−][src]Trait cntrlr::io::Write
Allows writing bytes to a sink
Associated Types
type Error: Debug
[src]
The error type
type Future: Future<Output = Result<usize, Self::Error>> + 'a
[src]
The future for Self::write()
type FlushFuture: Future<Output = Result<(), Self::Error>> + 'a
[src]
The future for Self::flush()
Required methods
pub fn write<'a>(&'a mut self, buf: &'a [u8]) -> Self::Future
[src]
Write bytes to the device
This writes as many bytes as possible, up to buf.len()
, and
returns the number of bytes written.
pub fn flush<'a>(&'a mut self) -> Self::FlushFuture
[src]
Ensure all written bytes have been transmitted
On devices which do not support this operation, this function does nothing.
Implementors
impl<M, T, R, const N: usize> Write for cntrlr::hw::board::teensy_common::io::Serial<M, T, R, N> where
M: 'static,
T: UartTx<M, N> + 'static,
R: 'static,
[src]
M: 'static,
T: UartTx<M, N> + 'static,
R: 'static,
type Error = SerialError
type Future = impl Future<Output = Result<usize, Self::Error>> + 'a
type FlushFuture = impl Future<Output = Result<(), Self::Error>> + 'a
pub fn write<'a>(&'a mut self, buf: &'a [u8]) -> Self::Future
[src]
pub fn flush<'a>(&'a mut self) -> Self::FlushFuture
[src]
impl<T, R, const N: usize> Write for cntrlr::hw::board::red_v::io::Serial<T, R, N> where
T: UartTx<Fe310G002, N> + 'static,
R: 'static,
[src]
T: UartTx<Fe310G002, N> + 'static,
R: 'static,
This is supported on
board="red_v"
only.