Trait wasmtime_wasi_http::bindings::http::types::HostRequestOptions
source · pub trait HostRequestOptions {
// Required methods
fn new(&mut self) -> Result<Resource<RequestOptions>>;
fn connect_timeout(
&mut self,
self_: Resource<RequestOptions>,
) -> Result<Option<Duration>>;
fn set_connect_timeout(
&mut self,
self_: Resource<RequestOptions>,
duration: Option<Duration>,
) -> Result<Result<(), ()>>;
fn first_byte_timeout(
&mut self,
self_: Resource<RequestOptions>,
) -> Result<Option<Duration>>;
fn set_first_byte_timeout(
&mut self,
self_: Resource<RequestOptions>,
duration: Option<Duration>,
) -> Result<Result<(), ()>>;
fn between_bytes_timeout(
&mut self,
self_: Resource<RequestOptions>,
) -> Result<Option<Duration>>;
fn set_between_bytes_timeout(
&mut self,
self_: Resource<RequestOptions>,
duration: Option<Duration>,
) -> Result<Result<(), ()>>;
fn drop(&mut self, rep: Resource<RequestOptions>) -> Result<()>;
}
Required Methods§
sourcefn new(&mut self) -> Result<Resource<RequestOptions>>
fn new(&mut self) -> Result<Resource<RequestOptions>>
Construct a default request-options
value.
sourcefn connect_timeout(
&mut self,
self_: Resource<RequestOptions>,
) -> Result<Option<Duration>>
fn connect_timeout( &mut self, self_: Resource<RequestOptions>, ) -> Result<Option<Duration>>
The timeout for the initial connect to the HTTP Server.
sourcefn set_connect_timeout(
&mut self,
self_: Resource<RequestOptions>,
duration: Option<Duration>,
) -> Result<Result<(), ()>>
fn set_connect_timeout( &mut self, self_: Resource<RequestOptions>, duration: Option<Duration>, ) -> Result<Result<(), ()>>
Set the timeout for the initial connect to the HTTP Server. An error return value indicates that this timeout is not supported.
sourcefn first_byte_timeout(
&mut self,
self_: Resource<RequestOptions>,
) -> Result<Option<Duration>>
fn first_byte_timeout( &mut self, self_: Resource<RequestOptions>, ) -> Result<Option<Duration>>
The timeout for receiving the first byte of the Response body.
sourcefn set_first_byte_timeout(
&mut self,
self_: Resource<RequestOptions>,
duration: Option<Duration>,
) -> Result<Result<(), ()>>
fn set_first_byte_timeout( &mut self, self_: Resource<RequestOptions>, duration: Option<Duration>, ) -> Result<Result<(), ()>>
Set the timeout for receiving the first byte of the Response body. An error return value indicates that this timeout is not supported.
sourcefn between_bytes_timeout(
&mut self,
self_: Resource<RequestOptions>,
) -> Result<Option<Duration>>
fn between_bytes_timeout( &mut self, self_: Resource<RequestOptions>, ) -> Result<Option<Duration>>
The timeout for receiving subsequent chunks of bytes in the Response body stream.
sourcefn set_between_bytes_timeout(
&mut self,
self_: Resource<RequestOptions>,
duration: Option<Duration>,
) -> Result<Result<(), ()>>
fn set_between_bytes_timeout( &mut self, self_: Resource<RequestOptions>, duration: Option<Duration>, ) -> Result<Result<(), ()>>
Set the timeout for receiving subsequent chunks of bytes in the Response body stream. An error return value indicates that this timeout is not supported.
fn drop(&mut self, rep: Resource<RequestOptions>) -> Result<()>
Implementations on Foreign Types§
source§impl<_T: HostRequestOptions + ?Sized + Send> HostRequestOptions for &mut _T
impl<_T: HostRequestOptions + ?Sized + Send> HostRequestOptions for &mut _T
source§fn new(&mut self) -> Result<Resource<RequestOptions>>
fn new(&mut self) -> Result<Resource<RequestOptions>>
Construct a default request-options
value.
source§fn connect_timeout(
&mut self,
self_: Resource<RequestOptions>,
) -> Result<Option<Duration>>
fn connect_timeout( &mut self, self_: Resource<RequestOptions>, ) -> Result<Option<Duration>>
The timeout for the initial connect to the HTTP Server.
source§fn set_connect_timeout(
&mut self,
self_: Resource<RequestOptions>,
duration: Option<Duration>,
) -> Result<Result<(), ()>>
fn set_connect_timeout( &mut self, self_: Resource<RequestOptions>, duration: Option<Duration>, ) -> Result<Result<(), ()>>
Set the timeout for the initial connect to the HTTP Server. An error return value indicates that this timeout is not supported.
source§fn first_byte_timeout(
&mut self,
self_: Resource<RequestOptions>,
) -> Result<Option<Duration>>
fn first_byte_timeout( &mut self, self_: Resource<RequestOptions>, ) -> Result<Option<Duration>>
The timeout for receiving the first byte of the Response body.
source§fn set_first_byte_timeout(
&mut self,
self_: Resource<RequestOptions>,
duration: Option<Duration>,
) -> Result<Result<(), ()>>
fn set_first_byte_timeout( &mut self, self_: Resource<RequestOptions>, duration: Option<Duration>, ) -> Result<Result<(), ()>>
Set the timeout for receiving the first byte of the Response body. An error return value indicates that this timeout is not supported.
source§fn between_bytes_timeout(
&mut self,
self_: Resource<RequestOptions>,
) -> Result<Option<Duration>>
fn between_bytes_timeout( &mut self, self_: Resource<RequestOptions>, ) -> Result<Option<Duration>>
The timeout for receiving subsequent chunks of bytes in the Response body stream.
source§fn set_between_bytes_timeout(
&mut self,
self_: Resource<RequestOptions>,
duration: Option<Duration>,
) -> Result<Result<(), ()>>
fn set_between_bytes_timeout( &mut self, self_: Resource<RequestOptions>, duration: Option<Duration>, ) -> Result<Result<(), ()>>
Set the timeout for receiving subsequent chunks of bytes in the Response body stream. An error return value indicates that this timeout is not supported.