NextRequestOptions

Structin servefastly 0.13.1View source
pub struct NextRequestOptions { /* private fields */ }

Settings to use when waiting for a second (third, fourth, ...) request.

Methods

from_timeout

View source
fn from_timeout(timeout: Duration) -> Self

Shorthand for default().with_timeout(timeout); see NextRequestOptions::with_timeout.

Parameters

timeout: Duration

Returns

Self

with_timeout

View source
fn with_timeout(self, timeout: Duration) -> Self

Set a bound on how long a RequestPromise can be outstanding.

This timer starts at the creation of the RequestPromise. After the timeout, if not request is ready, the RequestPromise will report NextRequestError::EndOfSession.

If you want to bound how long a given .wait call lasts, use .wait_timeout.

Parameters

self: Self
timeout: Duration

Returns

Self

Trait implementations

impl Default for NextRequestOptions

fn default() -> Self

Returns

Self

Auto trait implementations

Blanket implementations