pub trait RelocatableStream {
// Required methods
fn recording(&self) -> bool;
fn has_outdated(&self) -> bool;
fn relocation_need(&self) -> RelocationNeed;
fn bytes_allocated(&self) -> u64;
fn relocate(&mut self, reason: RelocationReason, failures: &mut ErrorGraph);
fn cleanup_memory(&mut self, failures: &mut ErrorGraph);
}Expand description
One stream, as relocating its memory needs it: what a runtime whose
streams share one way to finish their work (a scheduler, say) supplies per
stream, leaving the rest of RelocatingStreams to that shared way.
Required Methods§
Sourcefn has_outdated(&self) -> bool
fn has_outdated(&self) -> bool
Whether a growth left pages behind in the stream’s memory.
Sourcefn relocation_need(&self) -> RelocationNeed
fn relocation_need(&self) -> RelocationNeed
Whether the stream’s memory wants a relocation, see
MemoryManagement::relocation_need.
Sourcefn bytes_allocated(&self) -> u64
fn bytes_allocated(&self) -> u64
The bytes the stream’s memory holds from the device.
Sourcefn relocate(&mut self, reason: RelocationReason, failures: &mut ErrorGraph)
fn relocate(&mut self, reason: RelocationReason, failures: &mut ErrorGraph)
Move what the stream’s memory holds on outdated pages, once every stream’s work is done.
Sourcefn cleanup_memory(&mut self, failures: &mut ErrorGraph)
fn cleanup_memory(&mut self, failures: &mut ErrorGraph)
Give back every page the stream’s memory holds and nothing needs.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".