#[non_exhaustive]pub struct FlexibleTimeRange {
pub max_duration: Option<Duration>,
pub min_duration: Option<Duration>,
pub start_time_not_earlier_than: Option<Timestamp>,
pub start_time_not_later_than: Option<Timestamp>,
/* private fields */
}Available on crate feature
advice only.Expand description
A flexible specification of a time range that has 3 points of flexibility: (1) a flexible start time, (2) a flexible end time, (3) a flexible duration.
It is possible to specify a contradictory time range that cannot be matched by any Interval. This causes a validation error.
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.max_duration: Option<Duration>§min_duration: Option<Duration>§start_time_not_earlier_than: Option<Timestamp>§start_time_not_later_than: Option<Timestamp>Implementations§
Source§impl FlexibleTimeRange
impl FlexibleTimeRange
pub fn new() -> Self
Sourcepub fn set_max_duration<T>(self, v: T) -> Self
pub fn set_max_duration<T>(self, v: T) -> Self
Sets the value of max_duration.
§Example
ⓘ
use wkt::Duration;
let x = FlexibleTimeRange::new().set_max_duration(Duration::default()/* use setters */);Sourcepub fn set_or_clear_max_duration<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_max_duration<T>(self, v: Option<T>) -> Self
Sets or clears the value of max_duration.
§Example
ⓘ
use wkt::Duration;
let x = FlexibleTimeRange::new().set_or_clear_max_duration(Some(Duration::default()/* use setters */));
let x = FlexibleTimeRange::new().set_or_clear_max_duration(None::<Duration>);Sourcepub fn set_min_duration<T>(self, v: T) -> Self
pub fn set_min_duration<T>(self, v: T) -> Self
Sets the value of min_duration.
§Example
ⓘ
use wkt::Duration;
let x = FlexibleTimeRange::new().set_min_duration(Duration::default()/* use setters */);Sourcepub fn set_or_clear_min_duration<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_min_duration<T>(self, v: Option<T>) -> Self
Sets or clears the value of min_duration.
§Example
ⓘ
use wkt::Duration;
let x = FlexibleTimeRange::new().set_or_clear_min_duration(Some(Duration::default()/* use setters */));
let x = FlexibleTimeRange::new().set_or_clear_min_duration(None::<Duration>);Sourcepub fn set_start_time_not_earlier_than<T>(self, v: T) -> Self
pub fn set_start_time_not_earlier_than<T>(self, v: T) -> Self
Sets the value of start_time_not_earlier_than.
§Example
ⓘ
use wkt::Timestamp;
let x = FlexibleTimeRange::new().set_start_time_not_earlier_than(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_start_time_not_earlier_than<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_start_time_not_earlier_than<T>(self, v: Option<T>) -> Self
Sets or clears the value of start_time_not_earlier_than.
§Example
ⓘ
use wkt::Timestamp;
let x = FlexibleTimeRange::new().set_or_clear_start_time_not_earlier_than(Some(Timestamp::default()/* use setters */));
let x = FlexibleTimeRange::new().set_or_clear_start_time_not_earlier_than(None::<Timestamp>);Sourcepub fn set_start_time_not_later_than<T>(self, v: T) -> Self
pub fn set_start_time_not_later_than<T>(self, v: T) -> Self
Sets the value of start_time_not_later_than.
§Example
ⓘ
use wkt::Timestamp;
let x = FlexibleTimeRange::new().set_start_time_not_later_than(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_start_time_not_later_than<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_start_time_not_later_than<T>(self, v: Option<T>) -> Self
Sets or clears the value of start_time_not_later_than.
§Example
ⓘ
use wkt::Timestamp;
let x = FlexibleTimeRange::new().set_or_clear_start_time_not_later_than(Some(Timestamp::default()/* use setters */));
let x = FlexibleTimeRange::new().set_or_clear_start_time_not_later_than(None::<Timestamp>);Trait Implementations§
Source§impl Clone for FlexibleTimeRange
impl Clone for FlexibleTimeRange
Source§fn clone(&self) -> FlexibleTimeRange
fn clone(&self) -> FlexibleTimeRange
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 FlexibleTimeRange
impl Debug for FlexibleTimeRange
Source§impl Default for FlexibleTimeRange
impl Default for FlexibleTimeRange
Source§fn default() -> FlexibleTimeRange
fn default() -> FlexibleTimeRange
Returns the “default value” for a type. Read more
Source§impl Message for FlexibleTimeRange
impl Message for FlexibleTimeRange
Source§impl PartialEq for FlexibleTimeRange
impl PartialEq for FlexibleTimeRange
impl StructuralPartialEq for FlexibleTimeRange
Auto Trait Implementations§
impl Freeze for FlexibleTimeRange
impl RefUnwindSafe for FlexibleTimeRange
impl Send for FlexibleTimeRange
impl Sync for FlexibleTimeRange
impl Unpin for FlexibleTimeRange
impl UnwindSafe for FlexibleTimeRange
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