Skip to main content

RelocatableStream

Trait RelocatableStream 

Source
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§

Source

fn recording(&self) -> bool

Whether any stream of the device records a graph.

Source

fn has_outdated(&self) -> bool

Whether a growth left pages behind in the stream’s memory.

Source

fn relocation_need(&self) -> RelocationNeed

Whether the stream’s memory wants a relocation, see MemoryManagement::relocation_need.

Source

fn bytes_allocated(&self) -> u64

The bytes the stream’s memory holds from the device.

Source

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.

Source

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".

Implementors§