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

pub struct WaitOptions { /* fields omitted */ }

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

Methods

impl WaitOptions[src]

pub fn timeout<D: Into<Option<Duration>>>(self, timeout: D) -> Self[src]

Set an optional timeout after which to abandon this wait.

pub fn retry_interval(self, interval: Duration) -> Self[src]

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

pub fn backoff_type(self, backoff_type: BackoffType) -> Self[src]

Should we use linear (default) or exponential backoff?

pub fn allowed_errors(self, count: u16) -> Self[src]

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

impl Default for WaitOptions[src]

Auto Trait Implementations

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = !

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Err = <U as TryFrom<T>>::Err