#[non_exhaustive]pub struct TimeWindow {
pub start_time: Option<Timestamp>,
pub end_time: Option<Timestamp>,
pub options: Option<Options>,
/* private fields */
}Expand description
Represents an arbitrary window of time.
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_time: Option<Timestamp>The time that the window first starts.
end_time: Option<Timestamp>The time that the window ends. The end time should take place after the start time.
options: Option<Options>Implementations§
Source§impl TimeWindow
impl TimeWindow
pub fn new() -> Self
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.
Sourcepub fn set_or_clear_end_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_end_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of end_time.
Sourcepub fn set_options<T: Into<Option<Options>>>(self, v: T) -> Self
pub fn set_options<T: Into<Option<Options>>>(self, v: T) -> Self
Sets the value of options.
Note that all the setters affecting options are mutually
exclusive.
Sourcepub fn maintenance_exclusion_options(
&self,
) -> Option<&Box<MaintenanceExclusionOptions>>
pub fn maintenance_exclusion_options( &self, ) -> Option<&Box<MaintenanceExclusionOptions>>
The value of options
if it holds a MaintenanceExclusionOptions, None if the field is not set or
holds a different branch.
Sourcepub fn set_maintenance_exclusion_options<T: Into<Box<MaintenanceExclusionOptions>>>(
self,
v: T,
) -> Self
pub fn set_maintenance_exclusion_options<T: Into<Box<MaintenanceExclusionOptions>>>( self, v: T, ) -> Self
Sets the value of options
to hold a MaintenanceExclusionOptions.
Note that all the setters affecting options are
mutually exclusive.
Trait Implementations§
Source§impl Clone for TimeWindow
impl Clone for TimeWindow
Source§fn clone(&self) -> TimeWindow
fn clone(&self) -> TimeWindow
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 TimeWindow
impl Debug for TimeWindow
Source§impl Default for TimeWindow
impl Default for TimeWindow
Source§fn default() -> TimeWindow
fn default() -> TimeWindow
Returns the “default value” for a type. Read more
Source§impl PartialEq for TimeWindow
impl PartialEq for TimeWindow
impl StructuralPartialEq for TimeWindow
Auto Trait Implementations§
impl Freeze for TimeWindow
impl RefUnwindSafe for TimeWindow
impl Send for TimeWindow
impl Sync for TimeWindow
impl Unpin for TimeWindow
impl UnwindSafe for TimeWindow
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