[−][src]Struct bigml::wait::WaitOptions
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
impl RefUnwindSafe for WaitOptions
impl Send for WaitOptions
impl Sync for WaitOptions
impl Unpin for WaitOptions
impl UnwindSafe for WaitOptions
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,