pub struct HealthcareSystem {
pub facilities: Vec<HealthcareFacility>,
}Expand description
Healthcare system with multiple facilities
Fields§
§facilities: Vec<HealthcareFacility>All facilities in the system
Implementations§
Source§impl HealthcareSystem
impl HealthcareSystem
Sourcepub fn add_facility(&mut self, facility: HealthcareFacility)
pub fn add_facility(&mut self, facility: HealthcareFacility)
Add a facility to the system
Sourcepub fn total_capacity(&self) -> usize
pub fn total_capacity(&self) -> usize
Get total capacity across all facilities
Sourcepub fn total_icu_capacity(&self) -> usize
pub fn total_icu_capacity(&self) -> usize
Get total ICU capacity
Sourcepub fn total_available_beds(&self) -> usize
pub fn total_available_beds(&self) -> usize
Get total available beds
Sourcepub fn total_available_icu_beds(&self) -> usize
pub fn total_available_icu_beds(&self) -> usize
Get total available ICU beds
Sourcepub fn system_bed_utilization(&self) -> f64
pub fn system_bed_utilization(&self) -> f64
Calculate system-wide bed utilization
Sourcepub fn system_icu_utilization(&self) -> f64
pub fn system_icu_utilization(&self) -> f64
Calculate system-wide ICU utilization
Sourcepub fn is_overwhelmed(&self) -> bool
pub fn is_overwhelmed(&self) -> bool
Check if the system is overwhelmed (>90% utilization)
Sourcepub fn find_best_facility(&self) -> Option<&HealthcareFacility>
pub fn find_best_facility(&self) -> Option<&HealthcareFacility>
Find facility with most available beds
Trait Implementations§
Source§impl Clone for HealthcareSystem
impl Clone for HealthcareSystem
Source§fn clone(&self) -> HealthcareSystem
fn clone(&self) -> HealthcareSystem
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 HealthcareSystem
impl Debug for HealthcareSystem
Source§impl Default for HealthcareSystem
impl Default for HealthcareSystem
Source§impl<'de> Deserialize<'de> for HealthcareSystem
impl<'de> Deserialize<'de> for HealthcareSystem
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
Auto Trait Implementations§
impl Freeze for HealthcareSystem
impl RefUnwindSafe for HealthcareSystem
impl Send for HealthcareSystem
impl Sync for HealthcareSystem
impl Unpin for HealthcareSystem
impl UnwindSafe for HealthcareSystem
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