#[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>,
}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
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
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: f32Multiplier 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
Sourcepub fn set_initial_poll_delay<T: Into<Option<Duration>>>(self, v: T) -> Self
pub fn set_initial_poll_delay<T: Into<Option<Duration>>>(self, v: T) -> Self
Sets 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: Into<Option<Duration>>>(self, v: T) -> Self
pub fn set_max_poll_delay<T: Into<Option<Duration>>>(self, v: T) -> Self
Sets the value of max_poll_delay.
Sourcepub fn set_total_poll_timeout<T: Into<Option<Duration>>>(self, v: T) -> Self
pub fn set_total_poll_timeout<T: Into<Option<Duration>>>(self, v: T) -> Self
Sets 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
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LongRunning
impl Debug for LongRunning
Source§impl Default for LongRunning
impl Default for LongRunning
Source§fn default() -> LongRunning
fn default() -> LongRunning
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for LongRunningwhere
LongRunning: Default,
impl<'de> Deserialize<'de> for LongRunningwhere
LongRunning: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Message for LongRunning
impl Message for LongRunning
Source§impl PartialEq for LongRunning
impl PartialEq for LongRunning
Source§impl Serialize for LongRunning
impl Serialize for LongRunning
impl StructuralPartialEq for LongRunning
Auto Trait Implementations§
impl Freeze for LongRunning
impl RefUnwindSafe for LongRunning
impl Send for LongRunning
impl Sync for LongRunning
impl Unpin for LongRunning
impl UnwindSafe for LongRunning
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more