pub struct ResourceManager { /* private fields */ }Expand description
Resource manager for execution engines
Implementations§
Source§impl ResourceManager
impl ResourceManager
Sourcepub fn check_availability(
&self,
requirements: &ResourceRequirements,
) -> SklResult<()>
pub fn check_availability( &self, requirements: &ResourceRequirements, ) -> SklResult<()>
Check resource availability for task requirements
Sourcepub fn allocate_resources(
&self,
task: &ExecutionTask,
) -> SklResult<ResourceAllocation>
pub fn allocate_resources( &self, task: &ExecutionTask, ) -> SklResult<ResourceAllocation>
Allocate resources for a task
Sourcepub fn release_resources(
&self,
allocation: &ResourceAllocation,
) -> SklResult<()>
pub fn release_resources( &self, allocation: &ResourceAllocation, ) -> SklResult<()>
Release resources from an allocation
Sourcepub fn get_utilization(&self) -> SklResult<ResourceUtilization>
pub fn get_utilization(&self) -> SklResult<ResourceUtilization>
Get resource utilization statistics
Sourcepub fn add_monitor(&mut self, monitor: Box<dyn ResourceMonitor>)
pub fn add_monitor(&mut self, monitor: Box<dyn ResourceMonitor>)
Add a resource monitor
Sourcepub fn collect_all_metrics(&self) -> Vec<ResourceMetrics>
pub fn collect_all_metrics(&self) -> Vec<ResourceMetrics>
Collect metrics from all monitors
Sourcepub fn update_policies(&mut self, policies: ResourcePolicies)
pub fn update_policies(&mut self, policies: ResourcePolicies)
Update resource policies
Sourcepub fn get_policies(&self) -> ResourcePolicies
pub fn get_policies(&self) -> ResourcePolicies
Get current resource policies
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more