Connection

Trait Connection 

Source
pub trait Connection: Any + Send {
    // Required methods
    fn read(&mut self) -> DynFuture<'_, Box<[u8]>>;
    fn write<'a>(&'a mut self, response: &'a [u8]) -> DynFuture<'a, ()>;
}
Available on crate feature host only.

Required Methods§

Source

fn read(&mut self) -> DynFuture<'_, Box<[u8]>>

Receives a raw response (possibly tunneled) from the device.

Source

fn write<'a>(&'a mut self, response: &'a [u8]) -> DynFuture<'a, ()>

Sends a raw request (possibly tunneled) to the device.

Trait Implementations§

Source§

impl Connection for Box<dyn Connection>

Source§

fn read(&mut self) -> DynFuture<'_, Box<[u8]>>

Receives a raw response (possibly tunneled) from the device.
Source§

fn write<'a>(&'a mut self, response: &'a [u8]) -> DynFuture<'a, ()>

Sends a raw request (possibly tunneled) to the device.

Implementations on Foreign Types§

Source§

impl Connection for Box<dyn Connection>

Source§

fn read(&mut self) -> DynFuture<'_, Box<[u8]>>

Source§

fn write<'a>(&'a mut self, response: &'a [u8]) -> DynFuture<'a, ()>

Implementors§