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 more
sourceimpl 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
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &AccountsDataMeter) -> bool
fn ne(&self, other: &AccountsDataMeter) -> bool
This method tests for !=
.
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 T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more