[][src]Trait radio_api::Stream

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.

Loading content...

Implementors

Loading content...