Trait HostRequestOptions

Source
pub trait HostRequestOptions: Sized + Send {
    // 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§

Source

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>>

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<(), ()>>

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>>

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<(), ()>>

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>>

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<(), ()>>

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.

Source

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

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

Source§

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>>

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<(), ()>>

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>>

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<(), ()>>

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>>

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<(), ()>>

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.

Source§

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

Implementors§