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§

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

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§