#[non_exhaustive]pub struct WeeklyWindow {
pub days_of_week: Vec<DayOfWeek>,
pub start_time: Option<TimeOfDay>,
pub end_time: Option<TimeOfDay>,
/* private fields */
}
Expand description
Weekly windows. For example, blocking actions every Saturday and Sunday. Another example would be blocking actions every weekday from 5pm to midnight.
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.days_of_week: Vec<DayOfWeek>
Optional. Days of week. If left empty, all days of the week will be included.
start_time: Option<TimeOfDay>
Optional. Start time (inclusive). Use 00:00 for the beginning of the day. If you specify start_time you must also specify end_time. If left empty, this will block for the entire day for the days specified in days_of_week.
end_time: Option<TimeOfDay>
Optional. End time (exclusive). Use 24:00 to indicate midnight. If you specify end_time you must also specify start_time. If left empty, this will block for the entire day for the days specified in days_of_week.
Implementations§
Source§impl WeeklyWindow
impl WeeklyWindow
pub fn new() -> Self
Sourcepub fn set_days_of_week<T, V>(self, v: T) -> Self
pub fn set_days_of_week<T, V>(self, v: T) -> Self
Sets the value of days_of_week.
Sourcepub fn set_start_time<T>(self, v: T) -> Self
pub fn set_start_time<T>(self, v: T) -> Self
Sets the value of start_time.
Sourcepub fn set_or_clear_start_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_start_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of start_time.
Sourcepub fn set_end_time<T>(self, v: T) -> Self
pub fn set_end_time<T>(self, v: T) -> Self
Sets the value of end_time.
Trait Implementations§
Source§impl Clone for WeeklyWindow
impl Clone for WeeklyWindow
Source§fn clone(&self) -> WeeklyWindow
fn clone(&self) -> WeeklyWindow
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more