Skip to main content

DeviceProxyInterface

Trait DeviceProxyInterface 

Source
pub trait DeviceProxyInterface: Send + Sync {
    type RegisterReadResponseFut: Future<Output = Result<DeviceRegisterReadResult, Error>> + Send;
    type RegisterWriteResponseFut: Future<Output = Result<DeviceRegisterWriteResult, Error>> + Send;
    type GetPropertiesResponseFut: Future<Output = Result<DeviceGetPropertiesResponse, Error>> + Send;
    type WatchControllerWriteCommandsResponseFut: Future<Output = Result<DeviceWatchControllerWriteCommandsResult, Error>> + Send;
    type CancelWatchControllerWriteCommandsResponseFut: Future<Output = Result<DeviceCancelWatchControllerWriteCommandsResult, Error>> + Send;

    // Required methods
    fn register_read(
        &self,
        address: u16,
        size_bytes: u32,
    ) -> Self::RegisterReadResponseFut;
    fn register_write(
        &self,
        address: u16,
        data: &[u8],
    ) -> Self::RegisterWriteResponseFut;
    fn get_properties(&self) -> Self::GetPropertiesResponseFut;
    fn watch_controller_write_commands(
        &self,
        address: u8,
        size: u16,
        setup_wake_lease: Option<EventPair>,
    ) -> Self::WatchControllerWriteCommandsResponseFut;
    fn cancel_watch_controller_write_commands(
        &self,
        address: u8,
        size: u16,
    ) -> Self::CancelWatchControllerWriteCommandsResponseFut;
}

Required Associated Types§

Required Methods§

Implementors§