pub enum BalanceIdentifier {
Refund,
Payment,
Accumulate,
Purse(URef),
Public(PublicKey),
Account(AccountHash),
Entity(EntityAddr),
Internal(URefAddr),
PenalizedAccount(AccountHash),
PenalizedPayment,
}Expand description
Represents a way to make a balance inquiry.
Variants§
Refund
Use system refund purse (held by handle payment system contract).
Payment
Use system payment purse (held by handle payment system contract).
Accumulate
Use system accumulate purse (held by handle payment system contract).
Purse(URef)
Use purse associated to specified uref.
Public(PublicKey)
Use main purse of entity derived from public key.
Account(AccountHash)
Use main purse of entity from account hash.
Entity(EntityAddr)
Use main purse of entity.
Internal(URefAddr)
Use purse at Key::Purse(URefAddr).
PenalizedAccount(AccountHash)
Penalized account identifier.
PenalizedPayment
Penalized payment identifier.
Implementations§
Source§impl BalanceIdentifier
impl BalanceIdentifier
Sourcepub fn as_purse_addr(&self) -> Option<URefAddr>
pub fn as_purse_addr(&self) -> Option<URefAddr>
Returns underlying uref addr from balance identifier, if any.
Sourcepub fn purse_uref<S>(
&self,
tc: &mut TrackingCopy<S>,
protocol_version: ProtocolVersion,
) -> Result<URef, TrackingCopyError>
pub fn purse_uref<S>( &self, tc: &mut TrackingCopy<S>, protocol_version: ProtocolVersion, ) -> Result<URef, TrackingCopyError>
Return purse_uref, if able.
Sourcepub fn is_penalty(&self) -> bool
pub fn is_penalty(&self) -> bool
Is this balance identifier for penalty?
Trait Implementations§
Source§impl Clone for BalanceIdentifier
impl Clone for BalanceIdentifier
Source§fn clone(&self) -> BalanceIdentifier
fn clone(&self) -> BalanceIdentifier
Returns a copy 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 BalanceIdentifier
impl Debug for BalanceIdentifier
Source§impl Default for BalanceIdentifier
impl Default for BalanceIdentifier
Source§impl From<InitiatorAddr> for BalanceIdentifier
impl From<InitiatorAddr> for BalanceIdentifier
Source§fn from(value: InitiatorAddr) -> Self
fn from(value: InitiatorAddr) -> Self
Converts to this type from the input type.
Source§impl PartialEq for BalanceIdentifier
impl PartialEq for BalanceIdentifier
impl Eq for BalanceIdentifier
impl StructuralPartialEq for BalanceIdentifier
Auto Trait Implementations§
impl Freeze for BalanceIdentifier
impl RefUnwindSafe for BalanceIdentifier
impl Send for BalanceIdentifier
impl Sync for BalanceIdentifier
impl Unpin for BalanceIdentifier
impl UnwindSafe for BalanceIdentifier
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§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
Compare self to
key and return true if they are equal.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
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more