pub struct RepeatPolicy { /* private fields */ }Expand description
A validated repeat policy with count and interval.
Both count and interval_secs are guaranteed to be strictly positive
after construction through RepeatPolicy::new.
Implementations§
Source§impl RepeatPolicy
impl RepeatPolicy
Sourcepub fn new(count: u32, interval_secs: u64) -> Result<Self, RunPolicyError>
pub fn new(count: u32, interval_secs: u64) -> Result<Self, RunPolicyError>
Creates a validated repeat policy.
§Errors
Returns RunPolicyError::InvalidRepeatCount if count is zero.
Returns RunPolicyError::InvalidRepeatIntervalSecs if interval_secs is zero.
Sourcepub fn interval_secs(&self) -> u64
pub fn interval_secs(&self) -> u64
Returns the interval in seconds between derived runs.
Trait Implementations§
Source§impl Clone for RepeatPolicy
impl Clone for RepeatPolicy
Source§fn clone(&self) -> RepeatPolicy
fn clone(&self) -> RepeatPolicy
Returns a duplicate 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 RepeatPolicy
impl Debug for RepeatPolicy
Source§impl Hash for RepeatPolicy
impl Hash for RepeatPolicy
Source§impl PartialEq for RepeatPolicy
impl PartialEq for RepeatPolicy
impl Copy for RepeatPolicy
impl Eq for RepeatPolicy
impl StructuralPartialEq for RepeatPolicy
Auto Trait Implementations§
impl Freeze for RepeatPolicy
impl RefUnwindSafe for RepeatPolicy
impl Send for RepeatPolicy
impl Sync for RepeatPolicy
impl Unpin for RepeatPolicy
impl UnsafeUnpin for RepeatPolicy
impl UnwindSafe for RepeatPolicy
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