pub enum Growth {
Fitted {
held: u64,
},
Overdrawn {
held: u64,
reserved: u64,
budget: u64,
},
}Expand description
What a top-up of a claim’s reservation did.
It is deliberately not a Result: an operation that is already running
cannot be refused, and pretending otherwise would put a failure on a path
with nothing to do about it. What an overdraw does instead is close the door
behind it — reserved > budget makes MemoryLedger::try_reserve refuse
every new admission until this transfer finishes, which is the graceful
degradation the budget exists for.
Variants§
Fitted
The charge fitted inside the budget.
Overdrawn
The charge did not fit and was taken anyway. New admissions are refused until it is given back.
Trait Implementations§
impl Copy for Growth
impl Eq for Growth
impl StructuralPartialEq for Growth
Auto Trait Implementations§
impl Freeze for Growth
impl RefUnwindSafe for Growth
impl Send for Growth
impl Sync for Growth
impl Unpin for Growth
impl UnsafeUnpin for Growth
impl UnwindSafe for Growth
Blanket Implementations§
impl<T> Allocation for T
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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