pub struct ConsumerStats {
pub name: String,
pub region: MemoryRegion,
pub usage_bytes: usize,
pub priority: u8,
pub can_spill: bool,
}Expand description
Statistics about a memory consumer.
Fields§
§name: StringConsumer name.
region: MemoryRegionMemory region.
usage_bytes: usizeCurrent memory usage in bytes.
priority: u8Eviction priority.
can_spill: boolWhether spilling is supported.
Implementations§
Source§impl ConsumerStats
impl ConsumerStats
Sourcepub fn from_consumer(consumer: &dyn MemoryConsumer) -> Self
pub fn from_consumer(consumer: &dyn MemoryConsumer) -> Self
Creates stats from a consumer.
Trait Implementations§
Source§impl Clone for ConsumerStats
impl Clone for ConsumerStats
Source§fn clone(&self) -> ConsumerStats
fn clone(&self) -> ConsumerStats
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ConsumerStats
impl RefUnwindSafe for ConsumerStats
impl Send for ConsumerStats
impl Sync for ConsumerStats
impl Unpin for ConsumerStats
impl UnwindSafe for ConsumerStats
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more