#[non_exhaustive]pub struct OneTimeWindow {
pub start_date: Option<Date>,
pub start_time: Option<TimeOfDay>,
pub end_date: Option<Date>,
pub end_time: Option<TimeOfDay>,
/* private fields */
}
Expand description
One-time window within which actions are restricted. For example, blocking actions over New Year’s Eve from December 31st at 5pm to January 1st at 9am.
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.start_date: Option<Date>
Required. Start date.
start_time: Option<TimeOfDay>
Required. Start time (inclusive). Use 00:00 for the beginning of the day.
end_date: Option<Date>
Required. End date.
end_time: Option<TimeOfDay>
Required. End time (exclusive). You may use 24:00 for the end of the day.
Implementations§
Source§impl OneTimeWindow
impl OneTimeWindow
pub fn new() -> Self
Sourcepub fn set_start_date<T>(self, v: T) -> Self
pub fn set_start_date<T>(self, v: T) -> Self
Sets the value of start_date.
Sourcepub fn set_or_clear_start_date<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_start_date<T>(self, v: Option<T>) -> Self
Sets or clears the value of start_date.
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_date<T>(self, v: T) -> Self
pub fn set_end_date<T>(self, v: T) -> Self
Sets the value of end_date.
Sourcepub fn set_or_clear_end_date<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_end_date<T>(self, v: Option<T>) -> Self
Sets or clears the value of end_date.
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 OneTimeWindow
impl Clone for OneTimeWindow
Source§fn clone(&self) -> OneTimeWindow
fn clone(&self) -> OneTimeWindow
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 OneTimeWindow
impl Debug for OneTimeWindow
Source§impl Default for OneTimeWindow
impl Default for OneTimeWindow
Source§fn default() -> OneTimeWindow
fn default() -> OneTimeWindow
Returns the “default value” for a type. Read more
Source§impl Message for OneTimeWindow
impl Message for OneTimeWindow
Source§impl PartialEq for OneTimeWindow
impl PartialEq for OneTimeWindow
impl StructuralPartialEq for OneTimeWindow
Auto Trait Implementations§
impl Freeze for OneTimeWindow
impl RefUnwindSafe for OneTimeWindow
impl Send for OneTimeWindow
impl Sync for OneTimeWindow
impl Unpin for OneTimeWindow
impl UnwindSafe for OneTimeWindow
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