Trait radio_api::Stream [−][src]
pub trait Stream { fn write(&self, data: &[u8]) -> RadioResult<()>; fn read(&self) -> RadioResult<Vec<u8>>; }
Connections expect a struct instance with this trait to represent streams.
Required Methods
fn write(&self, data: &[u8]) -> RadioResult<()>
Write raw bytes to the stream.
fn read(&self) -> RadioResult<Vec<u8>>
Read raw bytes from the stream.