Trait wasmcloud_runtime::capability::http::types::HostRequestOptions
source · pub trait HostRequestOptions {
// Required methods
fn new(&mut self) -> Result<Resource<HostRequestOptions>, Error>;
fn connect_timeout(
&mut self,
self_: Resource<HostRequestOptions>,
) -> Result<Option<u64>, Error>;
fn set_connect_timeout(
&mut self,
self_: Resource<HostRequestOptions>,
duration: Option<u64>,
) -> Result<Result<(), ()>, Error>;
fn first_byte_timeout(
&mut self,
self_: Resource<HostRequestOptions>,
) -> Result<Option<u64>, Error>;
fn set_first_byte_timeout(
&mut self,
self_: Resource<HostRequestOptions>,
duration: Option<u64>,
) -> Result<Result<(), ()>, Error>;
fn between_bytes_timeout(
&mut self,
self_: Resource<HostRequestOptions>,
) -> Result<Option<u64>, Error>;
fn set_between_bytes_timeout(
&mut self,
self_: Resource<HostRequestOptions>,
duration: Option<u64>,
) -> Result<Result<(), ()>, Error>;
fn drop(&mut self, rep: Resource<HostRequestOptions>) -> Result<(), Error>;
}
Required Methods§
sourcefn new(&mut self) -> Result<Resource<HostRequestOptions>, Error>
fn new(&mut self) -> Result<Resource<HostRequestOptions>, Error>
Construct a default request-options
value.
sourcefn connect_timeout(
&mut self,
self_: Resource<HostRequestOptions>,
) -> Result<Option<u64>, Error>
fn connect_timeout( &mut self, self_: Resource<HostRequestOptions>, ) -> Result<Option<u64>, Error>
The timeout for the initial connect to the HTTP Server.
sourcefn set_connect_timeout(
&mut self,
self_: Resource<HostRequestOptions>,
duration: Option<u64>,
) -> Result<Result<(), ()>, Error>
fn set_connect_timeout( &mut self, self_: Resource<HostRequestOptions>, duration: Option<u64>, ) -> Result<Result<(), ()>, Error>
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<HostRequestOptions>,
) -> Result<Option<u64>, Error>
fn first_byte_timeout( &mut self, self_: Resource<HostRequestOptions>, ) -> Result<Option<u64>, Error>
The timeout for receiving the first byte of the Response body.
sourcefn set_first_byte_timeout(
&mut self,
self_: Resource<HostRequestOptions>,
duration: Option<u64>,
) -> Result<Result<(), ()>, Error>
fn set_first_byte_timeout( &mut self, self_: Resource<HostRequestOptions>, duration: Option<u64>, ) -> Result<Result<(), ()>, Error>
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<HostRequestOptions>,
) -> Result<Option<u64>, Error>
fn between_bytes_timeout( &mut self, self_: Resource<HostRequestOptions>, ) -> Result<Option<u64>, Error>
The timeout for receiving subsequent chunks of bytes in the Response body stream.
sourcefn set_between_bytes_timeout(
&mut self,
self_: Resource<HostRequestOptions>,
duration: Option<u64>,
) -> Result<Result<(), ()>, Error>
fn set_between_bytes_timeout( &mut self, self_: Resource<HostRequestOptions>, duration: Option<u64>, ) -> Result<Result<(), ()>, Error>
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<HostRequestOptions>) -> Result<(), Error>
Implementations on Foreign Types§
source§impl<_T> HostRequestOptions for &mut _T
impl<_T> HostRequestOptions for &mut _T
source§fn new(&mut self) -> Result<Resource<HostRequestOptions>, Error>
fn new(&mut self) -> Result<Resource<HostRequestOptions>, Error>
Construct a default request-options
value.
source§fn connect_timeout(
&mut self,
self_: Resource<HostRequestOptions>,
) -> Result<Option<u64>, Error>
fn connect_timeout( &mut self, self_: Resource<HostRequestOptions>, ) -> Result<Option<u64>, Error>
The timeout for the initial connect to the HTTP Server.
source§fn set_connect_timeout(
&mut self,
self_: Resource<HostRequestOptions>,
duration: Option<u64>,
) -> Result<Result<(), ()>, Error>
fn set_connect_timeout( &mut self, self_: Resource<HostRequestOptions>, duration: Option<u64>, ) -> Result<Result<(), ()>, Error>
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<HostRequestOptions>,
) -> Result<Option<u64>, Error>
fn first_byte_timeout( &mut self, self_: Resource<HostRequestOptions>, ) -> Result<Option<u64>, Error>
The timeout for receiving the first byte of the Response body.
source§fn set_first_byte_timeout(
&mut self,
self_: Resource<HostRequestOptions>,
duration: Option<u64>,
) -> Result<Result<(), ()>, Error>
fn set_first_byte_timeout( &mut self, self_: Resource<HostRequestOptions>, duration: Option<u64>, ) -> Result<Result<(), ()>, Error>
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<HostRequestOptions>,
) -> Result<Option<u64>, Error>
fn between_bytes_timeout( &mut self, self_: Resource<HostRequestOptions>, ) -> Result<Option<u64>, Error>
The timeout for receiving subsequent chunks of bytes in the Response body stream.
source§fn set_between_bytes_timeout(
&mut self,
self_: Resource<HostRequestOptions>,
duration: Option<u64>,
) -> Result<Result<(), ()>, Error>
fn set_between_bytes_timeout( &mut self, self_: Resource<HostRequestOptions>, duration: Option<u64>, ) -> Result<Result<(), ()>, Error>
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.