pub trait HostRequestOptions: Sized + 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§
Sourcefn new(
&mut self,
) -> impl Future<Output = Result<Resource<RequestOptions>>> + Send
fn new( &mut self, ) -> impl Future<Output = Result<Resource<RequestOptions>>> + Send
Creates a new request options resource with no options set.
Sourcefn set_timeout_ms(
&mut self,
self_: Resource<RequestOptions>,
timeout_ms: u32,
) -> impl Future<Output = Result<()>> + Send
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.
Sourcefn set_expected_replies(
&mut self,
self_: Resource<RequestOptions>,
expected_replies: u32,
) -> impl Future<Output = Result<()>> + Send
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.
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", so this trait is not object safe.
Implementations on Foreign Types§
Source§impl<_T: HostRequestOptions + ?Sized + Send> HostRequestOptions for &mut _T
impl<_T: HostRequestOptions + ?Sized + Send> HostRequestOptions for &mut _T
Source§async fn new(&mut self) -> Result<Resource<RequestOptions>>
async fn new(&mut self) -> Result<Resource<RequestOptions>>
Creates a new request options resource with no options set.
Source§async fn set_timeout_ms(
&mut self,
self_: Resource<RequestOptions>,
timeout_ms: u32,
) -> Result<()>
async fn set_timeout_ms( &mut self, self_: Resource<RequestOptions>, timeout_ms: u32, ) -> Result<()>
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§async fn set_expected_replies(
&mut self,
self_: Resource<RequestOptions>,
expected_replies: u32,
) -> Result<()>
async fn set_expected_replies( &mut self, self_: Resource<RequestOptions>, expected_replies: u32, ) -> Result<()>
The maximum number of replies to expect before returning.