#[non_exhaustive]pub struct TimeInterval {
pub start_time: Option<Timestamp>,
pub end_time: Option<Timestamp>,
/* private fields */
}Expand description
A time interval extending just after a start time through an end time. If the start time is the same as the end time, then the interval represents a single point in 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>Optional. The beginning of the time interval. The default value for the start time is the end time. The start time must not be later than the end time.
end_time: Option<Timestamp>Required. The end of the time interval.
Implementations§
Source§impl TimeInterval
impl TimeInterval
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.
§Example
ⓘ
use wkt::Timestamp;
let x = TimeInterval::new().set_start_time(Timestamp::default()/* use setters */);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.
§Example
ⓘ
use wkt::Timestamp;
let x = TimeInterval::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
let x = TimeInterval::new().set_or_clear_start_time(None::<Timestamp>);Sourcepub fn set_end_time<T>(self, v: T) -> Self
pub fn set_end_time<T>(self, v: T) -> Self
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
Trait Implementations§
Source§impl Clone for TimeInterval
impl Clone for TimeInterval
Source§fn clone(&self) -> TimeInterval
fn clone(&self) -> TimeInterval
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 TimeInterval
impl Debug for TimeInterval
Source§impl Default for TimeInterval
impl Default for TimeInterval
Source§fn default() -> TimeInterval
fn default() -> TimeInterval
Returns the “default value” for a type. Read more
Source§impl Message for TimeInterval
impl Message for TimeInterval
Source§impl PartialEq for TimeInterval
impl PartialEq for TimeInterval
impl StructuralPartialEq for TimeInterval
Auto Trait Implementations§
impl Freeze for TimeInterval
impl RefUnwindSafe for TimeInterval
impl Send for TimeInterval
impl Sync for TimeInterval
impl Unpin for TimeInterval
impl UnwindSafe for TimeInterval
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