pub struct AccountsDataMeter { /* private fields */ }Expand description
Meter and track the amount of available accounts data space
Implementations
sourceimpl AccountsDataMeter
 
impl AccountsDataMeter
sourcepub fn maximum(&self) -> u64
 
pub fn maximum(&self) -> u64
Return the maximum amount of accounts data space that can be used (in bytes)
sourcepub fn delta(&self) -> i64
 
pub fn delta(&self) -> i64
Return the amount of accounts data space that has changed (in bytes)
sourcepub fn adjust_delta(&mut self, amount: i64) -> Result<(), InstructionError>
 
pub fn adjust_delta(&mut self, amount: i64) -> Result<(), InstructionError>
Adjust the space used by accounts data by amount (in bytes).
If amount is positive, we increase the space used by accounts data.  If amount is
negative, we decrease the space used by accounts data.  If amount is greater than
the remaining space, return an error and do not adjust accounts data space.
sourcepub fn adjust_delta_unchecked(&mut self, amount: i64)
 
pub fn adjust_delta_unchecked(&mut self, amount: i64)
Unconditionally adjust accounts data space.  Refer to adjust_delta() for more
documentation.
Trait Implementations
sourceimpl Clone for AccountsDataMeter
 
impl Clone for AccountsDataMeter
sourcefn clone(&self) -> AccountsDataMeter
 
fn clone(&self) -> AccountsDataMeter
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from 
source. Read moresourceimpl Debug for AccountsDataMeter
 
impl Debug for AccountsDataMeter
sourceimpl Default for AccountsDataMeter
 
impl Default for AccountsDataMeter
sourcefn default() -> AccountsDataMeter
 
fn default() -> AccountsDataMeter
Returns the “default value” for a type. Read more
sourceimpl PartialEq<AccountsDataMeter> for AccountsDataMeter
 
impl PartialEq<AccountsDataMeter> for AccountsDataMeter
sourcefn eq(&self, other: &AccountsDataMeter) -> bool
 
fn eq(&self, other: &AccountsDataMeter) -> bool
impl Copy for AccountsDataMeter
impl Eq for AccountsDataMeter
impl StructuralEq for AccountsDataMeter
impl StructuralPartialEq for AccountsDataMeter
Auto Trait Implementations
impl RefUnwindSafe for AccountsDataMeter
impl Send for AccountsDataMeter
impl Sync for AccountsDataMeter
impl Unpin for AccountsDataMeter
impl UnwindSafe for AccountsDataMeter
Blanket Implementations
sourceimpl<T> AbiExample for T
 
impl<T> AbiExample for T
sourceimpl<T> BorrowMut<T> for Twhere
    T: ?Sized,
 
impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
 
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Qwhere
    Q: Eq + ?Sized,
    K: Borrow<Q> + ?Sized,
 
impl<Q, K> Equivalent<K> for Qwhere
    Q: Eq + ?Sized,
    K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
 
fn equivalent(&self, key: &K) -> bool
Compare self to 
key and return true if they are equal.