pub trait ResourceManager:
Send
+ Sync
+ Debug {
// Required methods
fn check_availability(
&self,
requirements: &TaskRequirements,
) -> SklResult<bool>;
fn allocate_resources(
&self,
requirements: &TaskRequirements,
) -> SklResult<ResourceAllocation>;
fn release_resources(&self, allocation: ResourceAllocation) -> SklResult<()>;
fn get_usage_summary(&self) -> ResourceUsageSummary;
fn initialize(&self) -> SklResult<()>;
fn shutdown(&self) -> SklResult<()>;
fn health_check(&self) -> Health;
}Expand description
Core resource manager trait
Required Methods§
Sourcefn check_availability(&self, requirements: &TaskRequirements) -> SklResult<bool>
fn check_availability(&self, requirements: &TaskRequirements) -> SklResult<bool>
Check if resources are available for the given requirements
Sourcefn allocate_resources(
&self,
requirements: &TaskRequirements,
) -> SklResult<ResourceAllocation>
fn allocate_resources( &self, requirements: &TaskRequirements, ) -> SklResult<ResourceAllocation>
Allocate resources for a task
Sourcefn release_resources(&self, allocation: ResourceAllocation) -> SklResult<()>
fn release_resources(&self, allocation: ResourceAllocation) -> SklResult<()>
Release allocated resources
Sourcefn get_usage_summary(&self) -> ResourceUsageSummary
fn get_usage_summary(&self) -> ResourceUsageSummary
Get current resource usage summary
Sourcefn initialize(&self) -> SklResult<()>
fn initialize(&self) -> SklResult<()>
Initialize the resource manager
Sourcefn health_check(&self) -> Health
fn health_check(&self) -> Health
Get resource manager health