Skip to main content

AndroidAutoMainTrait

Trait AndroidAutoMainTrait 

Source
pub trait AndroidAutoMainTrait:
    AndroidAutoSensorTrait
    + AndroidAutoAudioOutputTrait
    + AndroidAutoInputChannelTrait
    + AndroidAutoAudioInputTrait
    + AndroidAutoVideoChannelTrait
    + Send
    + Sync {
    // Required methods
    fn connect<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn disconnect<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_receiver<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Option<Receiver<SendableAndroidAutoMessage>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;

    // Provided methods
    fn supports_bluetooth(&self) -> Option<&dyn AndroidAutoBluetoothTrait> { ... }
    fn supports_wired(&self) -> Option<Arc<dyn AndroidAutoWiredTrait>> { ... }
    fn supports_navigation(&self) -> Option<&dyn AndroidAutoNavigationTrait> { ... }
}
Expand description

The base trait for crate users to implement

Required Methods§

Source

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

The android auto device just connected

Source

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

The android auto device disconnected

Source

fn get_receiver<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Option<Receiver<SendableAndroidAutoMessage>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieve the receiver so that the user can send messages to the android auto compatible device or crate

Provided Methods§

Source

fn supports_bluetooth(&self) -> Option<&dyn AndroidAutoBluetoothTrait>

Implement this to indicate that bluetooth hardware is possible, return None if bluetooth hardware is not present

Source

fn supports_wired(&self) -> Option<Arc<dyn AndroidAutoWiredTrait>>

Implement this to support wired android auto communications

Source

fn supports_navigation(&self) -> Option<&dyn AndroidAutoNavigationTrait>

Implement this to support navigation

Implementors§