pub enum BalanceIdentifierPurseResult {
RootNotFound,
Success {
purse_addr: URefAddr,
},
Failure(TrackingCopyError),
}Expand description
Result enum that represents all possible outcomes of a balance request.
Variants§
RootNotFound
Returned if a passed state root hash is not found.
Success
A query returned a balance.
Failure(TrackingCopyError)
Failure.
Implementations§
Source§impl BalanceIdentifierPurseResult
impl BalanceIdentifierPurseResult
Sourcepub fn purse_addr(&self) -> Option<URefAddr>
pub fn purse_addr(&self) -> Option<URefAddr>
Returns the purse address for a BalanceIdentifierPurseResult::Success variant.
Sourcepub fn is_success(&self) -> bool
pub fn is_success(&self) -> bool
Was the balance request successful?
Sourcepub fn error(&self) -> Option<&TrackingCopyError>
pub fn error(&self) -> Option<&TrackingCopyError>
Tracking copy error, if any.
Trait Implementations§
Source§impl Clone for BalanceIdentifierPurseResult
impl Clone for BalanceIdentifierPurseResult
Source§fn clone(&self) -> BalanceIdentifierPurseResult
fn clone(&self) -> BalanceIdentifierPurseResult
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 BalanceIdentifierPurseResult
impl Debug for BalanceIdentifierPurseResult
Source§impl From<Error> for BalanceIdentifierPurseResult
impl From<Error> for BalanceIdentifierPurseResult
Source§fn from(tce: TrackingCopyError) -> Self
fn from(tce: TrackingCopyError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for BalanceIdentifierPurseResult
impl RefUnwindSafe for BalanceIdentifierPurseResult
impl Send for BalanceIdentifierPurseResult
impl Sync for BalanceIdentifierPurseResult
impl Unpin for BalanceIdentifierPurseResult
impl UnwindSafe for BalanceIdentifierPurseResult
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<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