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§
Sourcefn connect<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
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
Sourcefn disconnect<'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,
The android auto device disconnected
Sourcefn 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,
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§
Sourcefn supports_bluetooth(&self) -> Option<&dyn AndroidAutoBluetoothTrait>
fn supports_bluetooth(&self) -> Option<&dyn AndroidAutoBluetoothTrait>
Implement this to indicate that bluetooth hardware is possible, return None if bluetooth hardware is not present
Sourcefn supports_wired(&self) -> Option<Arc<dyn AndroidAutoWiredTrait>>
fn supports_wired(&self) -> Option<Arc<dyn AndroidAutoWiredTrait>>
Implement this to support wired android auto communications
Implement this to support navigation
Sourcefn 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 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