Skip to main content

MemoryMetrics

Trait MemoryMetrics 

Source
pub trait MemoryMetrics:
    Clone
    + Send
    + Sync
    + 'static {
    // Required methods
    fn set_limit(&self, bytes: i64);
    fn set_in_use(&self, bytes: i64);
    fn inc_exhausted(&self, reason: &str);
}
Expand description

Trait for recording memory usage metrics.

Required Methods§

Source

fn set_limit(&self, bytes: i64)

Source

fn set_in_use(&self, bytes: i64)

Source

fn inc_exhausted(&self, reason: &str)

Record that immediate memory acquisition failed due to exhausted quota.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§