pub struct ResourcePool {
pub roles: HashMap<String, ResourceSlot>,
}Expand description
Pool of shared resources across all engagements.
Fields§
§roles: HashMap<String, ResourceSlot>Slots keyed by role name.
Implementations§
Source§impl ResourcePool
impl ResourcePool
Sourcepub fn total_hours(&self, role: &str) -> f64
pub fn total_hours(&self, role: &str) -> f64
Total hours available for a given role (accounting for unavailable periods).
Trait Implementations§
Source§impl Clone for ResourcePool
impl Clone for ResourcePool
Source§fn clone(&self) -> ResourcePool
fn clone(&self) -> ResourcePool
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 ResourcePool
impl Debug for ResourcePool
Source§impl<'de> Deserialize<'de> for ResourcePool
impl<'de> Deserialize<'de> for ResourcePool
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 ResourcePool
impl RefUnwindSafe for ResourcePool
impl Send for ResourcePool
impl Sync for ResourcePool
impl Unpin for ResourcePool
impl UnsafeUnpin for ResourcePool
impl UnwindSafe for ResourcePool
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