pub struct ResourceManager { /* private fields */ }
Expand description
リソースマネージャー
Implementations§
Source§impl ResourceManager
impl ResourceManager
pub fn new(available_resources: HashMap<String, f64>) -> Self
Sourcepub fn check_resource_availability(
&self,
requirements: &ResourceRequirement,
) -> bool
pub fn check_resource_availability( &self, requirements: &ResourceRequirement, ) -> bool
リソースが利用可能かチェック
Sourcepub fn allocate_resources(&mut self, requirements: &ResourceRequirement) -> bool
pub fn allocate_resources(&mut self, requirements: &ResourceRequirement) -> bool
リソースを割り当て
Sourcepub fn release_resources(&mut self, requirements: &ResourceRequirement)
pub fn release_resources(&mut self, requirements: &ResourceRequirement)
リソースを解放
Auto Trait Implementations§
impl Freeze for ResourceManager
impl RefUnwindSafe for ResourceManager
impl Send for ResourceManager
impl Sync for ResourceManager
impl Unpin for ResourceManager
impl UnwindSafe for ResourceManager
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