pub struct Policy {
pub reason: Reason,
/* private fields */
}Expand description
Minimum-night rule applied before a boarding reservation is accepted.
Fields§
§reason: ReasonOperational reason the minimum-night rule exists.
Implementations§
Source§impl Policy
impl Policy
Sourcepub const fn new(nights: StayNights, reason: Reason) -> Self
pub const fn new(nights: StayNights, reason: Reason) -> Self
Creates a minimum-stay policy from validated nights and the policy reason.
Sourcepub const fn nights(&self) -> StayNights
pub const fn nights(&self) -> StayNights
Returns the minimum nights required before this boarding reservation can be accepted.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Policy
impl<'de> Deserialize<'de> for Policy
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
impl Copy for Policy
impl Eq for Policy
impl StructuralPartialEq for Policy
Auto Trait Implementations§
impl Freeze for Policy
impl RefUnwindSafe for Policy
impl Send for Policy
impl Sync for Policy
impl Unpin for Policy
impl UnsafeUnpin for Policy
impl UnwindSafe for Policy
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