pub trait ResourceBudget: Send + Sync {
// Required methods
fn allocation_limit(&self) -> usize;
fn reserve(&self, bytes: usize) -> bool;
fn work(&self, units: usize) -> bool;
fn reject(&self);
}Expand description
The requesting importer owns counters, limits, cancellation, and sticky errors.
Required Methods§
fn allocation_limit(&self) -> usize
fn reserve(&self, bytes: usize) -> bool
fn work(&self, units: usize) -> bool
fn reject(&self)
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".