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§
fn set_limit(&self, bytes: i64)
fn set_in_use(&self, bytes: i64)
Sourcefn inc_exhausted(&self, reason: &str)
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".