pub struct SessionPromotion {
pub after_failures: u32,
pub window: String,
}Expand description
“After N failures within a window, promote this session’s starting rung.”
Fields§
§after_failures: u32Failure count that triggers promotion.
window: StringSliding window, e.g. "30m".
Implementations§
Source§impl SessionPromotion
impl SessionPromotion
Sourcepub fn window_duration(&self) -> Result<Duration>
pub fn window_duration(&self) -> Result<Duration>
Parse SessionPromotion::window into a Duration.
§Errors
Returns Error::BadDuration if the window is not <int><unit> with unit in s/m/h/d.
Trait Implementations§
Source§impl Clone for SessionPromotion
impl Clone for SessionPromotion
Source§fn clone(&self) -> SessionPromotion
fn clone(&self) -> SessionPromotion
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 SessionPromotion
impl Debug for SessionPromotion
Source§impl<'de> Deserialize<'de> for SessionPromotion
impl<'de> Deserialize<'de> for SessionPromotion
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
Auto Trait Implementations§
impl Freeze for SessionPromotion
impl RefUnwindSafe for SessionPromotion
impl Send for SessionPromotion
impl Sync for SessionPromotion
impl Unpin for SessionPromotion
impl UnsafeUnpin for SessionPromotion
impl UnwindSafe for SessionPromotion
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