pub struct Account {
pub held: i64,
pub bound: Option<u64>,
pub exhausted: bool,
}Expand description
The live bytes one account holds, and the bound it is held to.
An evaluation is charged what its own thread allocates and frees while the
account is charged_to: held is the net, so a value built and dropped
costs nothing once dropped, and a value still reachable when the scope ends
stays on the account. One account per evaluation and one per blue process
(a process is share-nothing, so what it holds is its own).
Fields§
§held: i64Bytes allocated and not returned while charged. Negative when the account returned more than it took (it freed what was there before).
bound: Option<u64>The most held may reach; None is unbounded.
exhausted: boolheld passed bound while charged. Stays set.
Implementations§
Trait Implementations§
impl Copy for Account
impl Eq for Account
impl StructuralPartialEq for Account
Auto Trait Implementations§
impl Freeze for Account
impl RefUnwindSafe for Account
impl Send for Account
impl Sync for Account
impl Unpin for Account
impl UnsafeUnpin for Account
impl UnwindSafe for Account
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.