Struct bigml::wait::WaitOptions[][src]

pub struct WaitOptions { /* fields omitted */ }
Expand description

Options controlling how long we wait and what makes us give up. This uses a “builder” pattern, so you can write:

use std::time::Duration;
use bigml::wait::WaitOptions;

let options = WaitOptions::default()
    .timeout(Duration::from_secs(120))
    .allowed_errors(5);

Implementations

Set an optional timeout after which to abandon this wait.

How long should we wait between retries? Defaults to 10 seconds. Note that BigML has suggested not polling more often than every 4 seconds, (to avoid losing API access) so if you set a lower value, this will be

Should we use linear (default) or exponential backoff?

How many errors should be ignored before giving up? This can be useful for long-running Execution jobs, where we don’t want a transient network error to result in failure.

Trait Implementations

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more