pub trait MutationBudget: Send {
// Required methods
fn begin(&mut self) -> Result<()>;
fn reserve(&mut self, bytes: u64) -> Result<()>;
fn end(&mut self);
fn effect(&mut self);
fn syscalls(&mut self, count: u64, settled: bool) -> Result<()>;
fn copied(&mut self, entries: u64, bytes: u64) -> Result<()>;
}Expand description
Resource accounting for native tree operations. Once a mutation succeeds, subsequent work must settle fuel rather than refuse. Heap admission stays fallible.
Required Methods§
fn begin(&mut self) -> Result<()>
fn reserve(&mut self, bytes: u64) -> Result<()>
fn end(&mut self)
fn effect(&mut self)
fn syscalls(&mut self, count: u64, settled: bool) -> Result<()>
fn copied(&mut self, entries: u64, bytes: u64) -> Result<()>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".