pub trait Budget: Send + Sync {
// Required method
fn charge(&self, units: u64) -> bool;
}Expand description
A CPU budget hook: work is charged in abstract units (roughly, bytes or
objects processed), and the hook stops processing by returning false.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".