pub trait DeviceProxyInterface: Send + Sync {
type GetClassResponseFut: Future<Output = Result<Class, Error>> + Send;
type SetConfigResponseFut: Future<Output = Result<i32, Error>> + Send;
type ReadResponseFut: Future<Output = Result<DeviceReadResult, Error>> + Send;
type WriteResponseFut: Future<Output = Result<DeviceWriteResult, Error>> + Send;
// Required methods
fn get_class(&self) -> Self::GetClassResponseFut;
fn set_config(&self, config: &Config) -> Self::SetConfigResponseFut;
fn read(&self) -> Self::ReadResponseFut;
fn write(&self, data: &[u8]) -> Self::WriteResponseFut;
}Required Associated Types§
type GetClassResponseFut: Future<Output = Result<Class, Error>> + Send
type SetConfigResponseFut: Future<Output = Result<i32, Error>> + Send
type ReadResponseFut: Future<Output = Result<DeviceReadResult, Error>> + Send
type WriteResponseFut: Future<Output = Result<DeviceWriteResult, Error>> + Send
Required Methods§
fn get_class(&self) -> Self::GetClassResponseFut
fn set_config(&self, config: &Config) -> Self::SetConfigResponseFut
fn read(&self) -> Self::ReadResponseFut
fn write(&self, data: &[u8]) -> Self::WriteResponseFut
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".