Trait MemoryReservation

Source
pub trait MemoryReservation:
    Debug
    + Send
    + Sync {
    // Required methods
    fn size(&self) -> usize;
    fn resize(&mut self, new_size: usize);
}
Expand description

A memory reservation within a MemoryPool that is freed on drop

Required Methods§

Source

fn size(&self) -> usize

Returns the size of this reservation in bytes.

Source

fn resize(&mut self, new_size: usize)

Resize this reservation to a new size in bytes.

Implementors§