pub struct BackTransfers<A>where
A: ManagedTypeApi,{
pub payments: ManagedVec<A, EgldOrEsdtTokenPayment<A>>,
}
Expand description
Holding back-transfer data, as retrieved from the VM.
It supports all transfer scenarios (EGLD, ESDT, mixed).
Fields§
§payments: ManagedVec<A, EgldOrEsdtTokenPayment<A>>
Implementations§
Source§impl<A> BackTransfers<A>where
A: ManagedTypeApi,
impl<A> BackTransfers<A>where
A: ManagedTypeApi,
pub fn new( payments: ManagedVec<A, EgldOrEsdtTokenPayment<A>>, ) -> BackTransfers<A>
Sourcepub fn to_single_esdt(self) -> EsdtTokenPayment<A>
pub fn to_single_esdt(self) -> EsdtTokenPayment<A>
Requires that back-transfer is a single ESDT payment, and returns it, crashes otherwise.
Sourcepub fn into_multi_value(
self,
) -> MultiValueEncoded<A, EgldOrEsdtTokenPaymentMultiValue<A>>
pub fn into_multi_value( self, ) -> MultiValueEncoded<A, EgldOrEsdtTokenPaymentMultiValue<A>>
Converts back-transfer to a multi-value object, in this case a multi-value list of triples:
[(token identifier, payment, nonce)]
Trait Implementations§
Source§impl<A> Clone for BackTransfers<A>where
A: Clone + ManagedTypeApi,
impl<A> Clone for BackTransfers<A>where
A: Clone + ManagedTypeApi,
Source§fn clone(&self) -> BackTransfers<A>
fn clone(&self) -> BackTransfers<A>
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<A> From<ManagedVec<A, EgldOrEsdtTokenPayment<A>>> for BackTransfers<A>where
A: ManagedTypeApi,
impl<A> From<ManagedVec<A, EgldOrEsdtTokenPayment<A>>> for BackTransfers<A>where
A: ManagedTypeApi,
Source§fn from(value: ManagedVec<A, EgldOrEsdtTokenPayment<A>>) -> BackTransfers<A>
fn from(value: ManagedVec<A, EgldOrEsdtTokenPayment<A>>) -> BackTransfers<A>
Converts to this type from the input type.
Auto Trait Implementations§
impl<A> Freeze for BackTransfers<A>
impl<A> RefUnwindSafe for BackTransfers<A>where
<A as HandleTypeInfo>::ManagedBufferHandle: RefUnwindSafe,
<A as HandleTypeInfo>::BigIntHandle: RefUnwindSafe,
A: RefUnwindSafe,
impl<A> Send for BackTransfers<A>where
<A as HandleTypeInfo>::ManagedBufferHandle: Send,
<A as HandleTypeInfo>::BigIntHandle: Send,
A: Send,
impl<A> Sync for BackTransfers<A>where
<A as HandleTypeInfo>::ManagedBufferHandle: Sync,
<A as HandleTypeInfo>::BigIntHandle: Sync,
A: Sync,
impl<A> Unpin for BackTransfers<A>where
<A as HandleTypeInfo>::ManagedBufferHandle: Unpin,
<A as HandleTypeInfo>::BigIntHandle: Unpin,
A: Unpin,
impl<A> UnwindSafe for BackTransfers<A>where
<A as HandleTypeInfo>::ManagedBufferHandle: UnwindSafe,
<A as HandleTypeInfo>::BigIntHandle: UnwindSafe,
A: UnwindSafe,
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> InterpretableFrom<&T> for Twhere
T: Clone,
impl<T> InterpretableFrom<&T> for Twhere
T: Clone,
fn interpret_from(from: &T, _context: &InterpreterContext) -> T
Source§impl<T> InterpretableFrom<T> for T
impl<T> InterpretableFrom<T> for T
fn interpret_from(from: T, _context: &InterpreterContext) -> T
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