Struct unc_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, power: Power, code_hash: CryptoHash, storage_usage: StorageUsage ) -> Self
pub fn amount(&self) -> Balance
pub fn locked(&self) -> Balance
pub fn power(&self) -> Power
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_power(&mut self, power: Power)
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
source§impl PartialEq for Account
impl PartialEq for Account
impl Eq for Account
impl StructuralPartialEq for Account
Auto Trait Implementations§
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