Trait DeviceSocketBindingsContext

Source
pub trait DeviceSocketBindingsContext<DeviceId: StrongDeviceIdentifier>: DeviceSocketTypes {
    // Required method
    fn receive_frame(
        &self,
        socket: &Self::SocketState<DeviceId::Weak>,
        device: &DeviceId,
        frame: Frame<&[u8]>,
        raw_frame: &[u8],
    );
}
Expand description

The execution context for device sockets provided by bindings.

Required Methods§

Source

fn receive_frame( &self, socket: &Self::SocketState<DeviceId::Weak>, device: &DeviceId, frame: Frame<&[u8]>, raw_frame: &[u8], )

Called for each received frame that matches the provided socket.

frame and raw_frame are parsed and raw views into the same data.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§