#[non_exhaustive]pub struct Break {
pub start_time: Option<Timestamp>,
pub duration: Option<Duration>,
/* private fields */
}Expand description
Data representing the execution of a break.
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>Start time of a break.
duration: Option<Duration>Duration of a break.
Implementations§
Source§impl Break
impl Break
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 = Break::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 = Break::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
let x = Break::new().set_or_clear_start_time(None::<Timestamp>);Sourcepub fn set_duration<T>(self, v: T) -> Self
pub fn set_duration<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_duration<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_duration<T>(self, v: Option<T>) -> Self
Trait Implementations§
impl StructuralPartialEq for Break
Auto Trait Implementations§
impl Freeze for Break
impl RefUnwindSafe for Break
impl Send for Break
impl Sync for Break
impl Unpin for Break
impl UnwindSafe for Break
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