pub trait DeviceProxyInterface: Send + Sync {
type OpenResponseFut: Future<Output = Result<DeviceOpenResult, Error>> + Send;
type CloseResponseFut: Future<Output = Result<DeviceCloseResult, Error>> + Send;
type GetMaxFrameSizeResponseFut: Future<Output = Result<u32, Error>> + Send;
// Required methods
fn open(&self) -> Self::OpenResponseFut;
fn close(&self) -> Self::CloseResponseFut;
fn get_max_frame_size(&self) -> Self::GetMaxFrameSizeResponseFut;
fn send_frame(&self, data: &[u8]) -> Result<(), Error>;
fn ready_to_receive_frames(
&self,
number_of_frames: u32,
) -> Result<(), Error>;
}Required Associated Types§
type OpenResponseFut: Future<Output = Result<DeviceOpenResult, Error>> + Send
type CloseResponseFut: Future<Output = Result<DeviceCloseResult, Error>> + Send
type GetMaxFrameSizeResponseFut: Future<Output = Result<u32, Error>> + Send
Required Methods§
fn open(&self) -> Self::OpenResponseFut
fn close(&self) -> Self::CloseResponseFut
fn get_max_frame_size(&self) -> Self::GetMaxFrameSizeResponseFut
fn send_frame(&self, data: &[u8]) -> Result<(), Error>
fn ready_to_receive_frames(&self, number_of_frames: u32) -> Result<(), Error>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".