pub struct SnapshotBudget(/* private fields */);Expand description
Shared logical reservation owner for retained snapshots, child states and provisional restore copies. It deliberately lives outside rewindable state.
Implementations§
Source§impl SnapshotBudget
impl SnapshotBudget
Sourcepub fn new(limits: SnapshotLimits) -> Self
pub fn new(limits: SnapshotLimits) -> Self
Creates an explicitly bounded resource owner; zero limits disable retention.
Sourcepub fn usage(&self) -> SnapshotUsage
pub fn usage(&self) -> SnapshotUsage
Observes retained counts and cumulative copying without native side effects.
Sourcepub fn reserve(
&self,
kind: SnapshotResourceKind,
estimate: Option<SnapshotEstimate>,
) -> Result<SnapshotReservation, ExecutionControlError>
pub fn reserve( &self, kind: SnapshotResourceKind, estimate: Option<SnapshotEstimate>, ) -> Result<SnapshotReservation, ExecutionControlError>
Reserves known costs before copying or retaining any state. Unknown costs, overflows and limits fail without changing accounting. After admission, dropping a failed attempt releases retention but never refunds copying.
Trait Implementations§
Source§impl Clone for SnapshotBudget
impl Clone for SnapshotBudget
Source§fn clone(&self) -> SnapshotBudget
fn clone(&self) -> SnapshotBudget
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for SnapshotBudget
impl !Send for SnapshotBudget
impl !Sync for SnapshotBudget
impl !UnwindSafe for SnapshotBudget
impl Freeze for SnapshotBudget
impl Unpin for SnapshotBudget
impl UnsafeUnpin for SnapshotBudget
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more