Skip to main content

Basic

Trait Basic 

Source
pub trait Basic:
    Debug
    + Send
    + Sync {
    // Required methods
    fn port(&self) -> u8;
    fn tokens(&self) -> Tokens;
    fn get_rx(&self) -> Result<Receiver<PortValueSingleFormat>>;

    // Provided methods
    fn commit<'life0, 'async_trait>(
        &'life0 self,
        msg: NotificationMessage,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn device_mode<'life0, 'async_trait>(
        &'life0 self,
        mode: u8,
        delta: u32,
        notification_enabled: bool,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn device_mode_combined<'life0, 'async_trait>(
        &'life0 self,
        subcommand: InputSetupCombinedSubcommand,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn device_command<'life0, 'async_trait>(
        &'life0 self,
        subcommand: PortOutputSubcommand,
        startup_info: StartupInfo,
        completion_info: CompletionInfo,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
}

Required Methods§

Provided Methods§

Source

fn commit<'life0, 'async_trait>( &'life0 self, msg: NotificationMessage, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn device_mode<'life0, 'async_trait>( &'life0 self, mode: u8, delta: u32, notification_enabled: bool, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn device_mode_combined<'life0, 'async_trait>( &'life0 self, subcommand: InputSetupCombinedSubcommand, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn device_command<'life0, 'async_trait>( &'life0 self, subcommand: PortOutputSubcommand, startup_info: StartupInfo, completion_info: CompletionInfo, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§