#[non_exhaustive]pub struct StudyTimeConstraint {
pub constraint: Option<Constraint>,
/* private fields */
}Expand description
Time-based Constraint for Study
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.constraint: Option<Constraint>Implementations§
Source§impl StudyTimeConstraint
impl StudyTimeConstraint
pub fn new() -> Self
Sourcepub fn set_constraint<T: Into<Option<Constraint>>>(self, v: T) -> Self
pub fn set_constraint<T: Into<Option<Constraint>>>(self, v: T) -> Self
Sets the value of constraint.
Note that all the setters affecting constraint are mutually
exclusive.
Sourcepub fn max_duration(&self) -> Option<&Box<Duration>>
pub fn max_duration(&self) -> Option<&Box<Duration>>
The value of constraint
if it holds a MaxDuration, None if the field is not set or
holds a different branch.
Sourcepub fn set_max_duration<T: Into<Box<Duration>>>(self, v: T) -> Self
pub fn set_max_duration<T: Into<Box<Duration>>>(self, v: T) -> Self
Sets the value of constraint
to hold a MaxDuration.
Note that all the setters affecting constraint are
mutually exclusive.
Sourcepub fn end_time(&self) -> Option<&Box<Timestamp>>
pub fn end_time(&self) -> Option<&Box<Timestamp>>
The value of constraint
if it holds a EndTime, None if the field is not set or
holds a different branch.
Sourcepub fn set_end_time<T: Into<Box<Timestamp>>>(self, v: T) -> Self
pub fn set_end_time<T: Into<Box<Timestamp>>>(self, v: T) -> Self
Sets the value of constraint
to hold a EndTime.
Note that all the setters affecting constraint are
mutually exclusive.
Trait Implementations§
Source§impl Clone for StudyTimeConstraint
impl Clone for StudyTimeConstraint
Source§fn clone(&self) -> StudyTimeConstraint
fn clone(&self) -> StudyTimeConstraint
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 StudyTimeConstraint
impl Debug for StudyTimeConstraint
Source§impl Default for StudyTimeConstraint
impl Default for StudyTimeConstraint
Source§fn default() -> StudyTimeConstraint
fn default() -> StudyTimeConstraint
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for StudyTimeConstraintwhere
StudyTimeConstraint: Default,
impl<'de> Deserialize<'de> for StudyTimeConstraintwhere
StudyTimeConstraint: 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 Message for StudyTimeConstraint
impl Message for StudyTimeConstraint
Source§impl PartialEq for StudyTimeConstraint
impl PartialEq for StudyTimeConstraint
Source§impl Serialize for StudyTimeConstraint
impl Serialize for StudyTimeConstraint
impl StructuralPartialEq for StudyTimeConstraint
Auto Trait Implementations§
impl Freeze for StudyTimeConstraint
impl RefUnwindSafe for StudyTimeConstraint
impl Send for StudyTimeConstraint
impl Sync for StudyTimeConstraint
impl Unpin for StudyTimeConstraint
impl UnwindSafe for StudyTimeConstraint
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