#[non_exhaustive]pub struct WeeklySchedule {
pub snapshots_to_keep: Option<f64>,
pub minute: Option<f64>,
pub hour: Option<f64>,
pub day: Option<String>,
/* private fields */
}Expand description
Make a snapshot every week e.g. at Monday 04:00, Wednesday 05:20, Sunday 23:50
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.snapshots_to_keep: Option<f64>The maximum number of Snapshots to keep for the hourly schedule
minute: Option<f64>Set the minute of the hour to start the snapshot (0-59), defaults to the top of the hour (0).
hour: Option<f64>Set the hour to start the snapshot (0-23), defaults to midnight (0).
day: Option<String>Set the day or days of the week to make a snapshot. Accepts a comma separated days of the week. Defaults to ‘Sunday’.
Implementations§
Source§impl WeeklySchedule
impl WeeklySchedule
pub fn new() -> Self
Sourcepub fn set_snapshots_to_keep<T>(self, v: T) -> Self
pub fn set_snapshots_to_keep<T>(self, v: T) -> Self
Sets the value of snapshots_to_keep.
§Example
ⓘ
let x = WeeklySchedule::new().set_snapshots_to_keep(42.0);Sourcepub fn set_or_clear_snapshots_to_keep<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_snapshots_to_keep<T>(self, v: Option<T>) -> Self
Sets or clears the value of snapshots_to_keep.
§Example
ⓘ
let x = WeeklySchedule::new().set_or_clear_snapshots_to_keep(Some(42.0));
let x = WeeklySchedule::new().set_or_clear_snapshots_to_keep(None::<f32>);Sourcepub fn set_minute<T>(self, v: T) -> Self
pub fn set_minute<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_minute<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_minute<T>(self, v: Option<T>) -> Self
Sourcepub fn set_or_clear_hour<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_hour<T>(self, v: Option<T>) -> Self
Trait Implementations§
Source§impl Clone for WeeklySchedule
impl Clone for WeeklySchedule
Source§fn clone(&self) -> WeeklySchedule
fn clone(&self) -> WeeklySchedule
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 WeeklySchedule
impl Debug for WeeklySchedule
Source§impl Default for WeeklySchedule
impl Default for WeeklySchedule
Source§fn default() -> WeeklySchedule
fn default() -> WeeklySchedule
Returns the “default value” for a type. Read more
Source§impl Message for WeeklySchedule
impl Message for WeeklySchedule
Source§impl PartialEq for WeeklySchedule
impl PartialEq for WeeklySchedule
impl StructuralPartialEq for WeeklySchedule
Auto Trait Implementations§
impl Freeze for WeeklySchedule
impl RefUnwindSafe for WeeklySchedule
impl Send for WeeklySchedule
impl Sync for WeeklySchedule
impl Unpin for WeeklySchedule
impl UnsafeUnpin for WeeklySchedule
impl UnwindSafe for WeeklySchedule
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