pub trait ServiceAdapter: Send + Sync {
// Required methods
fn service_type(&self) -> &'static str;
fn send_intent<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
target: &'life1 str,
intent: &'life2 Intent,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn subscribe_state(&self) -> Receiver<StateUpdate>;
}Required Methods§
Sourcefn service_type(&self) -> &'static str
fn service_type(&self) -> &'static str
Stable identifier used to match against Mapping.service_type.
Sourcefn send_intent<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
target: &'life1 str,
intent: &'life2 Intent,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn send_intent<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
target: &'life1 str,
intent: &'life2 Intent,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Send an intent to a specific target (zone_id, group_id, …).
Sourcefn subscribe_state(&self) -> Receiver<StateUpdate>
fn subscribe_state(&self) -> Receiver<StateUpdate>
Subscribe to state updates from this adapter.