pub trait Transport {
// Required methods
fn write_all(&mut self, bytes: &[u8]) -> Result<(), Error>;
fn read(&mut self, buf: &mut [u8]) -> Result<usize, Error>;
// Provided method
fn flush(&mut self) -> Result<(), Error> { ... }
}Expand description
Synchronous half-duplex byte transport.
Required Methods§
Provided Methods§
Implementations on Foreign Types§
Implementors§
impl Transport for VecTransport
Available on crate feature
alloc only.