Skip to main content

HostRequestOptions

Trait HostRequestOptions 

Source
pub trait HostRequestOptions: Send {
    // Required methods
    fn new(
        &mut self,
    ) -> impl Future<Output = Result<Resource<RequestOptions>>> + Send;
    fn set_timeout_ms(
        &mut self,
        self_: Resource<RequestOptions>,
        timeout_ms: u32,
    ) -> impl Future<Output = Result<()>> + Send;
    fn set_expected_replies(
        &mut self,
        self_: Resource<RequestOptions>,
        expected_replies: u32,
    ) -> impl Future<Output = Result<()>> + Send;
    fn drop(
        &mut self,
        rep: Resource<RequestOptions>,
    ) -> impl Future<Output = Result<()>> + Send;
}

Required Methods§

Source

fn new( &mut self, ) -> impl Future<Output = Result<Resource<RequestOptions>>> + Send

Creates a new request options resource with no options set.

Source

fn set_timeout_ms( &mut self, self_: Resource<RequestOptions>, timeout_ms: u32, ) -> impl Future<Output = Result<()>> + Send

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( &mut self, self_: Resource<RequestOptions>, expected_replies: u32, ) -> impl Future<Output = Result<()>> + Send

The maximum number of replies to expect before returning.

Source

fn drop( &mut self, rep: Resource<RequestOptions>, ) -> impl Future<Output = Result<()>> + Send

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

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

Source§

fn new( &mut self, ) -> impl Future<Output = Result<Resource<RequestOptions>>> + Send

Creates a new request options resource with no options set.

Source§

fn set_timeout_ms( &mut self, self_: Resource<RequestOptions>, timeout_ms: u32, ) -> impl Future<Output = Result<()>> + Send

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( &mut self, self_: Resource<RequestOptions>, expected_replies: u32, ) -> impl Future<Output = Result<()>> + Send

The maximum number of replies to expect before returning.

Source§

async fn drop(&mut self, rep: Resource<RequestOptions>) -> Result<()>

Implementors§

Source§

impl<H> HostRequestOptions for Ctx<H>
where H: Handler,