pub struct NightlySegmentSnapshot {
pub accommodation: Kind,
/* private fields */
}Expand description
Immutable nightly capacity snapshot for one accommodation segment.
Fields§
§accommodation: KindAccommodation segment these counts describe.
Implementations§
Source§impl NightlySegmentSnapshot
impl NightlySegmentSnapshot
Sourcepub const fn from_counts(counts: SegmentCounts) -> Self
pub const fn from_counts(counts: SegmentCounts) -> Self
Freezes builder-provided segment counts into a nightly snapshot used by capacity policy.
Sourcepub const fn total(&self) -> RoomCount
pub const fn total(&self) -> RoomCount
Returns total rooms known for this accommodation segment.
Sourcepub const fn occupied(&self) -> RoomCount
pub const fn occupied(&self) -> RoomCount
Returns occupied rooms already committed for this accommodation segment.
Sourcepub const fn available_rooms(&self) -> RoomCount
pub const fn available_rooms(&self) -> RoomCount
Returns remaining rooms after committed occupancy, saturating at zero for dirty data.
Trait Implementations§
Source§impl Clone for NightlySegmentSnapshot
impl Clone for NightlySegmentSnapshot
Source§fn clone(&self) -> NightlySegmentSnapshot
fn clone(&self) -> NightlySegmentSnapshot
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 NightlySegmentSnapshot
impl Debug for NightlySegmentSnapshot
Source§impl<'de> Deserialize<'de> for NightlySegmentSnapshot
impl<'de> Deserialize<'de> for NightlySegmentSnapshot
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 NightlySegmentSnapshot
impl PartialEq for NightlySegmentSnapshot
Source§impl Serialize for NightlySegmentSnapshot
impl Serialize for NightlySegmentSnapshot
impl Copy for NightlySegmentSnapshot
impl Eq for NightlySegmentSnapshot
impl StructuralPartialEq for NightlySegmentSnapshot
Auto Trait Implementations§
impl Freeze for NightlySegmentSnapshot
impl RefUnwindSafe for NightlySegmentSnapshot
impl Send for NightlySegmentSnapshot
impl Sync for NightlySegmentSnapshot
impl Unpin for NightlySegmentSnapshot
impl UnsafeUnpin for NightlySegmentSnapshot
impl UnwindSafe for NightlySegmentSnapshot
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