Skip to main content

HostBus

Trait HostBus 

Source
pub trait HostBus: Send + Sync {
    // Required methods
    fn verify<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        credential: &'life1 str,
        endpoint_id: &'life2 str,
    ) -> Pin<Box<dyn Future<Output = Result<Session, Refusal>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn renew<'life0, 'life1, 'async_trait>(
        &'life0 self,
        endpoint_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Session, Refusal>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn admit_renewal<'life0, 'life1, 'async_trait>(
        &'life0 self,
        endpoint_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Session, Refusal>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn invoke<'life0, 'life1, 'async_trait>(
        &'life0 self,
        capability: &'life1 str,
        payload: Value,
    ) -> Pin<Box<dyn Future<Output = Result<Value, Refusal>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

The app’s bus to the host for device-session capabilities.

Required Methods§

Source

fn verify<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, credential: &'life1 str, endpoint_id: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Session, Refusal>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

core.device_session.verify — full open with a credential.

Source

fn renew<'life0, 'life1, 'async_trait>( &'life0 self, endpoint_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Session, Refusal>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

core.device_session.renew — one-shot credential renewal, then close.

Source

fn admit_renewal<'life0, 'life1, 'async_trait>( &'life0 self, endpoint_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Session, Refusal>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

core.device_session.admit_renewal — open a renewal-only session.

Source

fn invoke<'life0, 'life1, 'async_trait>( &'life0 self, capability: &'life1 str, payload: Value, ) -> Pin<Box<dyn Future<Output = Result<Value, Refusal>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Generic capability invoke for device.call/1 (stamped payload already applied).

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§