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> { ... }
    fn usb_run<'life0, 'life1, 'async_trait>(
        &'life0 self,
        config: &'life1 AndroidAutoConfiguration,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
    fn wifi_run<'life0, 'life1, 'async_trait>(
        &'life0 self,
        config: &'life1 AndroidAutoConfiguration,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
    fn run<'life0, 'async_trait>(
        self: Box<Self>,
        config: AndroidAutoConfiguration,
        js: &'life0 mut JoinSet<Result<(), String>>,
    ) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
}
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

Source

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

Does a usb run

Source

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

does a wifi run

Source

fn run<'life0, 'async_trait>( self: Box<Self>, config: AndroidAutoConfiguration, js: &'life0 mut JoinSet<Result<(), String>>, ) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Runs the android auto server

Implementors§