Struct near_primitives_core::account::Account
source · pub struct Account { /* private fields */ }
Expand description
Per account information stored in the state.
Implementations§
source§impl Account
impl Account
sourcepub const MAX_ACCOUNT_DELETION_STORAGE_USAGE: u64 = 10_000u64
pub const MAX_ACCOUNT_DELETION_STORAGE_USAGE: u64 = 10_000u64
Max number of bytes an account can have in its state (excluding contract code) before it is infeasible to delete.
pub fn new( amount: Balance, locked: Balance, permanent_storage_bytes: StorageUsage, code_hash: CryptoHash, storage_usage: StorageUsage, protocol_version: ProtocolVersion, ) -> Self
pub fn amount(&self) -> Balance
pub fn permanent_storage_bytes(&self) -> StorageUsage
pub fn locked(&self) -> Balance
pub fn code_hash(&self) -> CryptoHash
pub fn storage_usage(&self) -> StorageUsage
pub fn version(&self) -> AccountVersion
pub fn set_amount(&mut self, amount: Balance)
pub fn set_locked(&mut self, locked: Balance)
pub fn set_code_hash(&mut self, code_hash: CryptoHash)
pub fn set_storage_usage(&mut self, storage_usage: StorageUsage)
pub fn set_version(&mut self, version: AccountVersion)
Trait Implementations§
source§impl BorshDeserialize for Account
impl BorshDeserialize for Account
fn deserialize_reader<R: Read>(rd: &mut R) -> Result<Self>
source§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes.
source§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
Deserialize this instance from a slice of bytes.
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
source§impl BorshSerialize for Account
impl BorshSerialize for Account
source§impl<'de> Deserialize<'de> for Account
impl<'de> Deserialize<'de> for Account
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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 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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)