pub struct AgeThreshold { /* private fields */ }Expand description
Age gate applied when determining whether a pet may book a service.
Implementations§
Source§impl AgeThreshold
impl AgeThreshold
Sourcepub const fn new(minimum: MinimumAgeWeeks, reason: AgePolicyReason) -> Self
pub const fn new(minimum: MinimumAgeWeeks, reason: AgePolicyReason) -> Self
Assembles a reservation policy value from validated age and reason parts.
Sourcepub const fn minimum(&self) -> MinimumAgeWeeks
pub const fn minimum(&self) -> MinimumAgeWeeks
Returns the reservation minimum used by the policy gate.
Sourcepub const fn reason(&self) -> AgePolicyReason
pub const fn reason(&self) -> AgePolicyReason
Returns the reservation reason used by the policy gate.
Trait Implementations§
Source§impl Clone for AgeThreshold
impl Clone for AgeThreshold
Source§fn clone(&self) -> AgeThreshold
fn clone(&self) -> AgeThreshold
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 AgeThreshold
impl Debug for AgeThreshold
Source§impl<'de> Deserialize<'de> for AgeThreshold
impl<'de> Deserialize<'de> for AgeThreshold
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 AgeThreshold
impl PartialEq for AgeThreshold
Source§impl Serialize for AgeThreshold
impl Serialize for AgeThreshold
impl Eq for AgeThreshold
impl StructuralPartialEq for AgeThreshold
Auto Trait Implementations§
impl Freeze for AgeThreshold
impl RefUnwindSafe for AgeThreshold
impl Send for AgeThreshold
impl Sync for AgeThreshold
impl Unpin for AgeThreshold
impl UnsafeUnpin for AgeThreshold
impl UnwindSafe for AgeThreshold
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