Trait wasmcloud_system_interface::system::Provider[][src]

pub trait Provider {
    const SCHEMA_ID: &'static str;
    const SCHEMA: &'static str;

    #[must_use]
    fn health_request<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        context: &'life1 Context<'life2>,
        arg: &'life3 HealthCheckRequest
    ) -> Pin<Box<dyn Future<Output = Result<HealthCheckResponse, RpcError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        'life3: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn bind_actor<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        context: &'life1 Context<'life2>,
        arg: &'life3 String
    ) -> Pin<Box<dyn Future<Output = Result<(), RpcError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        'life3: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn remove_actor<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        context: &'life1 Context<'life2>,
        arg: &'life3 String
    ) -> Pin<Box<dyn Future<Output = Result<(), RpcError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        'life3: 'async_trait,
        Self: 'async_trait
; }
Expand description

Capability provider interface - required methods Service Provider trait

Associated Constants

const SCHEMA_ID: &'static str[src]

256-bit signature for this trait schema, base64-encoded

const SCHEMA: &'static str[src]

schema of this trait in json, base64-encoded

Required methods

#[must_use]
fn health_request<'life0, 'life1, 'life2, 'life3, 'async_trait>(
    &'life0 self,
    context: &'life1 Context<'life2>,
    arg: &'life3 HealthCheckRequest
) -> Pin<Box<dyn Future<Output = Result<HealthCheckResponse, RpcError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    'life3: 'async_trait,
    Self: 'async_trait, 
[src]

Perform health check. Called at regular intervals by host

#[must_use]
fn bind_actor<'life0, 'life1, 'life2, 'life3, 'async_trait>(
    &'life0 self,
    context: &'life1 Context<'life2>,
    arg: &'life3 String
) -> Pin<Box<dyn Future<Output = Result<(), RpcError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    'life3: 'async_trait,
    Self: 'async_trait, 
[src]

Instruction to bind actor

  • param: string: actor id (public key)

#[must_use]
fn remove_actor<'life0, 'life1, 'life2, 'life3, 'async_trait>(
    &'life0 self,
    context: &'life1 Context<'life2>,
    arg: &'life3 String
) -> Pin<Box<dyn Future<Output = Result<(), RpcError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    'life3: 'async_trait,
    Self: 'async_trait, 
[src]

Instruction to forget actor

  • param: string: actor ID (public key)

Implementors

impl<T: Transport + Sync + Send> Provider for ProviderClient<T>[src]

fn health_request<'life0, 'life1, 'life2, 'life3, 'async_trait>(
    &'life0 self,
    ctx: &'life1 Context<'life2>,
    value: &'life3 HealthCheckRequest
) -> Pin<Box<dyn Future<Output = Result<HealthCheckResponse, RpcError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    'life3: 'async_trait,
    Self: 'async_trait, 
[src]

fn bind_actor<'life0, 'life1, 'life2, 'life3, 'async_trait>(
    &'life0 self,
    ctx: &'life1 Context<'life2>,
    value: &'life3 String
) -> Pin<Box<dyn Future<Output = Result<(), RpcError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    'life3: 'async_trait,
    Self: 'async_trait, 
[src]

fn remove_actor<'life0, 'life1, 'life2, 'life3, 'async_trait>(
    &'life0 self,
    ctx: &'life1 Context<'life2>,
    value: &'life3 String
) -> Pin<Box<dyn Future<Output = Result<(), RpcError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    'life3: 'async_trait,
    Self: 'async_trait, 
[src]