#[repr(transparent)]pub struct OptionalAccount(pub Option<Account>);Expand description
A wrapper for Option<Account> with customized representation.
Tuple Fields§
§0: Option<Account>Implementations§
Source§impl OptionalAccount
impl OptionalAccount
Sourcepub fn status(&self) -> AccountStatus
pub fn status(&self) -> AccountStatus
Returns an optional account status.
Sourcepub fn last_trans_lt(&self) -> u64
pub fn last_trans_lt(&self) -> u64
Logical time after the last transaction execution if account exists or zero otherwise.
Sourcepub fn balance(&self) -> &CurrencyCollection
pub fn balance(&self) -> &CurrencyCollection
Account balance for all currencies.
Sourcepub fn state(&self) -> Option<&AccountState>
pub fn state(&self) -> Option<&AccountState>
Returns an account state if it exists.
Trait Implementations§
Source§impl Clone for OptionalAccount
impl Clone for OptionalAccount
Source§fn clone(&self) -> OptionalAccount
fn clone(&self) -> OptionalAccount
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OptionalAccount
impl Debug for OptionalAccount
Source§impl Default for OptionalAccount
impl Default for OptionalAccount
Source§fn default() -> OptionalAccount
fn default() -> OptionalAccount
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for OptionalAccount
impl<'de> Deserialize<'de> for OptionalAccount
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 From<Account> for OptionalAccount
impl From<Account> for OptionalAccount
Source§impl<'tlb> Load<'tlb> for OptionalAccount
impl<'tlb> Load<'tlb> for OptionalAccount
Source§impl PartialEq for OptionalAccount
impl PartialEq for OptionalAccount
Source§impl Serialize for OptionalAccount
impl Serialize for OptionalAccount
Source§impl Store for OptionalAccount
impl Store for OptionalAccount
Source§fn store_into(
&self,
__builder: &mut CellBuilder,
__context: &dyn CellContext,
) -> Result<(), Error>
fn store_into( &self, __builder: &mut CellBuilder, __context: &dyn CellContext, ) -> Result<(), Error>
Tries to store itself into the cell builder.
impl Eq for OptionalAccount
impl StructuralPartialEq for OptionalAccount
Auto Trait Implementations§
impl Freeze for OptionalAccount
impl !RefUnwindSafe for OptionalAccount
impl Send for OptionalAccount
impl Sync for OptionalAccount
impl Unpin for OptionalAccount
impl !UnwindSafe for OptionalAccount
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
Compares
self to key and returns true if they are equal.