#[non_exhaustive]pub struct TimeWindow {
pub start_time: Option<Timestamp>,
pub end_time: Option<Timestamp>,
pub options: Option<Options>,
}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
Sourcepub fn set_start_time<T: Into<Option<Timestamp>>>(self, v: T) -> Self
pub fn set_start_time<T: Into<Option<Timestamp>>>(self, v: T) -> Self
Sets the value of start_time.
Sourcepub fn set_end_time<T: Into<Option<Timestamp>>>(self, v: T) -> Self
pub fn set_end_time<T: Into<Option<Timestamp>>>(self, v: T) -> Self
Sets 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.
Sourcepub fn get_maintenance_exclusion_options(
&self,
) -> Option<&Box<MaintenanceExclusionOptions>>
pub fn get_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 copy 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<'de> Deserialize<'de> for TimeWindowwhere
TimeWindow: Default,
impl<'de> Deserialize<'de> for TimeWindowwhere
TimeWindow: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for TimeWindow
impl PartialEq for TimeWindow
Source§impl Serialize for TimeWindow
impl Serialize 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