pub enum TransferTargetMode {
ExistingAccount {
target_account_hash: AccountHash,
main_purse: URef,
},
PurseExists {
target_account_hash: Option<AccountHash>,
purse_uref: URef,
},
CreateAccount(AccountHash),
}Expand description
A target mode indicates if a native transfer’s arguments will resolve to an existing purse, or will have to create a new account first.
Variants§
ExistingAccount
Native transfer arguments resolved into a transfer to an existing account.
Fields
§
target_account_hash: AccountHashExisting account hash.
PurseExists
Native transfer arguments resolved into a transfer to a purse.
Fields
§
target_account_hash: Option<AccountHash>Target account hash (if known).
CreateAccount(AccountHash)
Native transfer arguments resolved into a transfer to a new account.
Implementations§
Source§impl TransferTargetMode
impl TransferTargetMode
Sourcepub fn target_account_hash(&self) -> Option<AccountHash>
pub fn target_account_hash(&self) -> Option<AccountHash>
Target account hash, if any.
Trait Implementations§
Source§impl Clone for TransferTargetMode
impl Clone for TransferTargetMode
Source§fn clone(&self) -> TransferTargetMode
fn clone(&self) -> TransferTargetMode
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 TransferTargetMode
impl Debug for TransferTargetMode
Source§impl PartialEq for TransferTargetMode
impl PartialEq for TransferTargetMode
impl Copy for TransferTargetMode
impl StructuralPartialEq for TransferTargetMode
Auto Trait Implementations§
impl Freeze for TransferTargetMode
impl RefUnwindSafe for TransferTargetMode
impl Send for TransferTargetMode
impl Sync for TransferTargetMode
impl Unpin for TransferTargetMode
impl UnwindSafe for TransferTargetMode
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