#[non_exhaustive]pub struct LongRunning {
pub initial_poll_delay: Option<Duration>,
pub poll_delay_multiplier: f32,
pub max_poll_delay: Option<Duration>,
pub total_poll_timeout: Option<Duration>,
/* private fields */
}
Expand description
Describes settings to use when generating API methods that use the long-running operation pattern. All default values below are from those used in the client library generators (e.g. Java).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.initial_poll_delay: Option<Duration>
Initial delay after which the first poll request will be made. Default value: 5 seconds.
poll_delay_multiplier: f32
Multiplier to gradually increase delay between subsequent polls until it reaches max_poll_delay. Default value: 1.5.
max_poll_delay: Option<Duration>
Maximum time between two subsequent poll requests. Default value: 45 seconds.
total_poll_timeout: Option<Duration>
Total polling timeout. Default value: 5 minutes.
Implementations§
Source§impl LongRunning
impl LongRunning
pub fn new() -> Self
Sourcepub fn set_initial_poll_delay<T>(self, v: T) -> Self
pub fn set_initial_poll_delay<T>(self, v: T) -> Self
Sets the value of initial_poll_delay.
Sourcepub fn set_or_clear_initial_poll_delay<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_initial_poll_delay<T>(self, v: Option<T>) -> Self
Sets or clears the value of initial_poll_delay.
Sourcepub fn set_poll_delay_multiplier<T: Into<f32>>(self, v: T) -> Self
pub fn set_poll_delay_multiplier<T: Into<f32>>(self, v: T) -> Self
Sets the value of poll_delay_multiplier.
Sourcepub fn set_max_poll_delay<T>(self, v: T) -> Self
pub fn set_max_poll_delay<T>(self, v: T) -> Self
Sets the value of max_poll_delay.
Sourcepub fn set_or_clear_max_poll_delay<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_max_poll_delay<T>(self, v: Option<T>) -> Self
Sets or clears the value of max_poll_delay.
Sourcepub fn set_total_poll_timeout<T>(self, v: T) -> Self
pub fn set_total_poll_timeout<T>(self, v: T) -> Self
Sets the value of total_poll_timeout.
Sourcepub fn set_or_clear_total_poll_timeout<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_total_poll_timeout<T>(self, v: Option<T>) -> Self
Sets or clears the value of total_poll_timeout.
Trait Implementations§
Source§impl Clone for LongRunning
impl Clone for LongRunning
Source§fn clone(&self) -> LongRunning
fn clone(&self) -> LongRunning
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more