pub struct EsdtTokenPaymentMultiValue<M: ManagedTypeApi> { /* private fields */ }
Expand description
Thin wrapper around EsdtTokenPayment, which has different I/O behaviour:
- as input, is built from 3 arguments instead of 1: token identifier, nonce, value
- as output, it becomes 3 results instead of 1: token identifier, nonce, value
Implementations§
Source§impl<M: ManagedTypeApi> EsdtTokenPaymentMultiValue<M>
impl<M: ManagedTypeApi> EsdtTokenPaymentMultiValue<M>
pub fn into_inner(self) -> EsdtTokenPayment<M>
Trait Implementations§
Source§impl<M: Clone + ManagedTypeApi> Clone for EsdtTokenPaymentMultiValue<M>
impl<M: Clone + ManagedTypeApi> Clone for EsdtTokenPaymentMultiValue<M>
Source§fn clone(&self) -> EsdtTokenPaymentMultiValue<M>
fn clone(&self) -> EsdtTokenPaymentMultiValue<M>
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<M: Debug + ManagedTypeApi> Debug for EsdtTokenPaymentMultiValue<M>
impl<M: Debug + ManagedTypeApi> Debug for EsdtTokenPaymentMultiValue<M>
Source§impl<M: ManagedTypeApi> From<EsdtTokenPayment<M>> for EsdtTokenPaymentMultiValue<M>
impl<M: ManagedTypeApi> From<EsdtTokenPayment<M>> for EsdtTokenPaymentMultiValue<M>
Source§fn from(obj: EsdtTokenPayment<M>) -> Self
fn from(obj: EsdtTokenPayment<M>) -> Self
Converts to this type from the input type.
Source§impl<M: ManagedTypeApi> ManagedVecItem for EsdtTokenPaymentMultiValue<M>
impl<M: ManagedTypeApi> ManagedVecItem for EsdtTokenPaymentMultiValue<M>
Source§const SKIPS_RESERIALIZATION: bool = false
const SKIPS_RESERIALIZATION: bool = false
If true, then the encoding of the item is identical to the payload,
and no further conversion is necessary
(the underlying buffer can be used as-is during serialization).
False for all managed types, but true for basic types (like
u32
).Source§type PAYLOAD = <EsdtTokenPayment<M> as ManagedVecItem>::PAYLOAD
type PAYLOAD = <EsdtTokenPayment<M> as ManagedVecItem>::PAYLOAD
Type managing the underlying binary representation in a ManagedVec..
Source§type Ref<'a> = ManagedVecRef<'a, EsdtTokenPaymentMultiValue<M>>
type Ref<'a> = ManagedVecRef<'a, EsdtTokenPaymentMultiValue<M>>
Reference representation of the ManagedVec item. Read more
Source§fn read_from_payload(payload: &Self::PAYLOAD) -> Self
fn read_from_payload(payload: &Self::PAYLOAD) -> Self
Parses given bytes as a an owned object.
Source§unsafe fn borrow_from_payload<'a>(payload: &Self::PAYLOAD) -> Self::Ref<'a>
unsafe fn borrow_from_payload<'a>(payload: &Self::PAYLOAD) -> Self::Ref<'a>
Parses given bytes as a representation of the object, either owned, or a reference. Read more
Source§fn save_to_payload(self, payload: &mut Self::PAYLOAD)
fn save_to_payload(self, payload: &mut Self::PAYLOAD)
Converts the object into bytes. Read more
fn payload_size() -> usize
Source§impl<M: PartialEq + ManagedTypeApi> PartialEq for EsdtTokenPaymentMultiValue<M>
impl<M: PartialEq + ManagedTypeApi> PartialEq for EsdtTokenPaymentMultiValue<M>
Source§fn eq(&self, other: &EsdtTokenPaymentMultiValue<M>) -> bool
fn eq(&self, other: &EsdtTokenPaymentMultiValue<M>) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.Source§impl<M> TopDecodeMulti for EsdtTokenPaymentMultiValue<M>where
M: ManagedTypeApi,
impl<M> TopDecodeMulti for EsdtTokenPaymentMultiValue<M>where
M: ManagedTypeApi,
fn multi_decode_or_handle_err<I, H>(
input: &mut I,
h: H,
) -> Result<Self, H::HandledErr>where
I: TopDecodeMultiInput,
H: DecodeErrorHandler,
Source§const IS_SINGLE_VALUE: bool = false
const IS_SINGLE_VALUE: bool = false
Used to optimize single value loading of endpoint arguments.
fn multi_decode<I>(input: &mut I) -> Result<Self, DecodeError>where
I: TopDecodeMultiInput,
Source§impl<M> TopDecodeMultiLength for EsdtTokenPaymentMultiValue<M>where
M: ManagedTypeApi,
impl<M> TopDecodeMultiLength for EsdtTokenPaymentMultiValue<M>where
M: ManagedTypeApi,
Source§impl<M> TopEncodeMulti for EsdtTokenPaymentMultiValue<M>where
M: ManagedTypeApi,
impl<M> TopEncodeMulti for EsdtTokenPaymentMultiValue<M>where
M: ManagedTypeApi,
Source§fn multi_encode_or_handle_err<O, H>(
&self,
output: &mut O,
h: H,
) -> Result<(), H::HandledErr>where
O: TopEncodeMultiOutput,
H: EncodeErrorHandler,
fn multi_encode_or_handle_err<O, H>(
&self,
output: &mut O,
h: H,
) -> Result<(), H::HandledErr>where
O: TopEncodeMultiOutput,
H: EncodeErrorHandler,
Version of
top_encode
that can handle errors as soon as they occur.
For instance in can exit immediately and make sure that if it returns, it is a success.
By not deferring error handling, this can lead to somewhat smaller bytecode.Source§fn multi_encode<O>(&self, output: &mut O) -> Result<(), EncodeError>where
O: TopEncodeMultiOutput,
fn multi_encode<O>(&self, output: &mut O) -> Result<(), EncodeError>where
O: TopEncodeMultiOutput,
Attempt to serialize the value to ouput.
Source§impl<M> TypeAbi for EsdtTokenPaymentMultiValue<M>where
M: ManagedTypeApi,
impl<M> TypeAbi for EsdtTokenPaymentMultiValue<M>where
M: ManagedTypeApi,
type Unmanaged = EsdtTokenPaymentMultiValue<M>
fn type_name() -> TypeName
fn type_name_rust() -> TypeName
fn type_names() -> TypeNames
Source§fn provide_type_descriptions<TDC: TypeDescriptionContainer>(
accumulator: &mut TDC,
)
fn provide_type_descriptions<TDC: TypeDescriptionContainer>( accumulator: &mut TDC, )
A type can provide more than its own name.
For instance, a struct can also provide the descriptions of the type of its fields.
TypeAbi doesn’t care for the exact accumulator type,
which is abstracted by the TypeDescriptionContainer trait.
impl<M: Eq + ManagedTypeApi> Eq for EsdtTokenPaymentMultiValue<M>
impl<M: ManagedTypeApi> StructuralPartialEq for EsdtTokenPaymentMultiValue<M>
impl<M> TypeAbiFrom<EsdtTokenPaymentMultiValue<M>> for EsdtTokenPaymentMultiValue<M>where
M: ManagedTypeApi,
Auto Trait Implementations§
impl<M> Freeze for EsdtTokenPaymentMultiValue<M>where
<M as HandleTypeInfo>::BigIntHandle: Freeze,
<M as HandleTypeInfo>::ManagedBufferHandle: Freeze,
impl<M> RefUnwindSafe for EsdtTokenPaymentMultiValue<M>where
<M as HandleTypeInfo>::BigIntHandle: RefUnwindSafe,
<M as HandleTypeInfo>::ManagedBufferHandle: RefUnwindSafe,
M: RefUnwindSafe,
impl<M> Send for EsdtTokenPaymentMultiValue<M>where
<M as HandleTypeInfo>::BigIntHandle: Send,
<M as HandleTypeInfo>::ManagedBufferHandle: Send,
M: Send,
impl<M> Sync for EsdtTokenPaymentMultiValue<M>where
<M as HandleTypeInfo>::BigIntHandle: Sync,
<M as HandleTypeInfo>::ManagedBufferHandle: Sync,
M: Sync,
impl<M> Unpin for EsdtTokenPaymentMultiValue<M>where
<M as HandleTypeInfo>::BigIntHandle: Unpin,
<M as HandleTypeInfo>::ManagedBufferHandle: Unpin,
M: Unpin,
impl<M> UnwindSafe for EsdtTokenPaymentMultiValue<M>where
<M as HandleTypeInfo>::BigIntHandle: UnwindSafe,
<M as HandleTypeInfo>::ManagedBufferHandle: UnwindSafe,
M: 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