pub trait ResidencyWindowManager {
type Error: Error + From<ResidencyWindowError>;
// Required methods
fn prepare_window(
&self,
active: &[OffloadUnitId],
upcoming: &[OffloadUnitId],
tier: MemoryTier,
) -> Result<Vec<(OffloadUnitId, PrefetchOutcome)>, Self::Error>;
fn prepare_group_window(
&self,
group: &str,
active: &[OffloadUnitId],
upcoming: &[OffloadUnitId],
tier: MemoryTier,
) -> Result<Vec<(OffloadUnitId, PrefetchOutcome)>, Self::Error>;
fn evict(
&self,
id: &OffloadUnitId,
tier: MemoryTier,
) -> Result<bool, Self::Error>;
fn unit_reports(&self) -> Result<Vec<UnitResidencyReport>, Self::Error>;
}Expand description
Backend-independent operations required by ordered residency windows.
Required Associated Types§
Sourcetype Error: Error + From<ResidencyWindowError>
type Error: Error + From<ResidencyWindowError>
Manager-specific failure including neutral window validation failures.
Required Methods§
Sourcefn prepare_window(
&self,
active: &[OffloadUnitId],
upcoming: &[OffloadUnitId],
tier: MemoryTier,
) -> Result<Vec<(OffloadUnitId, PrefetchOutcome)>, Self::Error>
fn prepare_window( &self, active: &[OffloadUnitId], upcoming: &[OffloadUnitId], tier: MemoryTier, ) -> Result<Vec<(OffloadUnitId, PrefetchOutcome)>, Self::Error>
Replaces the default protected window and prepares bounded lookahead.
Sourcefn prepare_group_window(
&self,
group: &str,
active: &[OffloadUnitId],
upcoming: &[OffloadUnitId],
tier: MemoryTier,
) -> Result<Vec<(OffloadUnitId, PrefetchOutcome)>, Self::Error>
fn prepare_group_window( &self, group: &str, active: &[OffloadUnitId], upcoming: &[OffloadUnitId], tier: MemoryTier, ) -> Result<Vec<(OffloadUnitId, PrefetchOutcome)>, Self::Error>
Replaces one named protected window and prepares bounded lookahead.
Sourcefn evict(
&self,
id: &OffloadUnitId,
tier: MemoryTier,
) -> Result<bool, Self::Error>
fn evict( &self, id: &OffloadUnitId, tier: MemoryTier, ) -> Result<bool, Self::Error>
Removes one concrete resident copy if present.
Sourcefn unit_reports(&self) -> Result<Vec<UnitResidencyReport>, Self::Error>
fn unit_reports(&self) -> Result<Vec<UnitResidencyReport>, Self::Error>
Returns logical unit state in stable identifier order.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".