wasmcloud_runtime::capability::messaging::request_reply

Trait HostRequestOptions

source
pub trait HostRequestOptions {
    // Required methods
    fn new<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = Result<Resource<RequestOptions>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn set_timeout_ms<'life0, 'async_trait>(
        &'life0 mut self,
        self_: Resource<RequestOptions>,
        timeout_ms: u32,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn set_expected_replies<'life0, 'async_trait>(
        &'life0 mut self,
        self_: Resource<RequestOptions>,
        expected_replies: u32,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn drop<'life0, 'async_trait>(
        &'life0 mut self,
        rep: Resource<RequestOptions>,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

source

fn new<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<Resource<RequestOptions>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Creates a new request options resource with no options set.

source

fn set_timeout_ms<'life0, 'async_trait>( &'life0 mut self, self_: Resource<RequestOptions>, timeout_ms: u32, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

The maximum amount of time to wait for a response. If the timeout value is not set, then the request/reply operation will block until a message is received in response.

source

fn set_expected_replies<'life0, 'async_trait>( &'life0 mut self, self_: Resource<RequestOptions>, expected_replies: u32, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

The maximum number of replies to expect before returning.

source

fn drop<'life0, 'async_trait>( &'life0 mut self, rep: Resource<RequestOptions>, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementations on Foreign Types§

source§

impl<_T: HostRequestOptions + ?Sized + Send> HostRequestOptions for &mut _T

source§

fn new<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<Resource<RequestOptions>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Creates a new request options resource with no options set.

source§

fn set_timeout_ms<'life0, 'async_trait>( &'life0 mut self, self_: Resource<RequestOptions>, timeout_ms: u32, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

The maximum amount of time to wait for a response. If the timeout value is not set, then the request/reply operation will block until a message is received in response.

source§

fn set_expected_replies<'life0, 'async_trait>( &'life0 mut self, self_: Resource<RequestOptions>, expected_replies: u32, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

The maximum number of replies to expect before returning.

source§

fn drop<'life0, 'async_trait>( &'life0 mut self, rep: Resource<RequestOptions>, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§