pub trait StreamBytes {
// Required methods
fn write(&mut self, buf: &[u8]) -> Result<usize, QdnfError>;
fn read(&mut self, buf: &mut [u8]) -> Result<usize, QdnfError>;
fn shutdown(&mut self) -> Result<(), QdnfError>;
}Expand description
Non-blocking byte pipe. Named-pipe and UDS adapters implement this.
Ok(n) is accepted bytes; cursors advance only by that n.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".