Struct multiversx_sc_modules::staking::TokenAmountPair
source · pub struct TokenAmountPair<M: ManagedTypeApi> {
pub token_id: TokenIdentifier<M>,
pub amount: BigUint<M>,
}
Fields§
§token_id: TokenIdentifier<M>
§amount: BigUint<M>
Trait Implementations§
source§impl<M: ManagedTypeApi> TopDecode for TokenAmountPair<M>
impl<M: ManagedTypeApi> TopDecode for TokenAmountPair<M>
source§fn top_decode_or_handle_err<I, H>(
top_input: I,
h: H
) -> Result<Self, H::HandledErr>where
I: TopDecodeInput,
H: DecodeErrorHandler,
fn top_decode_or_handle_err<I, H>( top_input: I, h: H ) -> Result<Self, H::HandledErr>where I: TopDecodeInput, H: DecodeErrorHandler,
Version of
top_decode
that can handle errors as soon as they occur.
For instance it 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.§fn top_decode<I>(input: I) -> Result<Self, DecodeError>where
I: TopDecodeInput,
fn top_decode<I>(input: I) -> Result<Self, DecodeError>where I: TopDecodeInput,
Attempt to deserialize the value from input.
source§impl<M: ManagedTypeApi> TopEncode for TokenAmountPair<M>
impl<M: ManagedTypeApi> TopEncode for TokenAmountPair<M>
source§fn top_encode_or_handle_err<O, H>(
&self,
output: O,
h: H
) -> Result<(), H::HandledErr>where
O: TopEncodeOutput,
H: EncodeErrorHandler,
fn top_encode_or_handle_err<O, H>( &self, output: O, h: H ) -> Result<(), H::HandledErr>where O: TopEncodeOutput, 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.§fn top_encode<O>(&self, output: O) -> Result<(), EncodeError>where
O: TopEncodeOutput,
fn top_encode<O>(&self, output: O) -> Result<(), EncodeError>where O: TopEncodeOutput,
Attempt to serialize the value to ouput.
Auto Trait Implementations§
impl<M> CodecFromSelf for TokenAmountPair<M>
impl<M> RefUnwindSafe for TokenAmountPair<M>where <M as HandleTypeInfo>::BigIntHandle: RefUnwindSafe, <M as HandleTypeInfo>::ManagedBufferHandle: RefUnwindSafe,
impl<M> Send for TokenAmountPair<M>where <M as HandleTypeInfo>::BigIntHandle: Send, <M as HandleTypeInfo>::ManagedBufferHandle: Send,
impl<M> Sync for TokenAmountPair<M>where <M as HandleTypeInfo>::BigIntHandle: Sync, <M as HandleTypeInfo>::ManagedBufferHandle: Sync,
impl<M> Unpin for TokenAmountPair<M>where <M as HandleTypeInfo>::BigIntHandle: Unpin, <M as HandleTypeInfo>::ManagedBufferHandle: Unpin,
impl<M> UnwindSafe for TokenAmountPair<M>where <M as HandleTypeInfo>::BigIntHandle: UnwindSafe, <M as HandleTypeInfo>::ManagedBufferHandle: 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> SCCodec for Twhere
T: TopEncode,
impl<T> SCCodec for Twhere T: TopEncode,
fn fmt<F>(&self, f: &mut F)where F: FormatByteReceiver,
§impl<T> TopDecodeMulti for Twhere
T: TopDecode,
impl<T> TopDecodeMulti for Twhere T: TopDecode,
§const IS_SINGLE_VALUE: bool = true
const IS_SINGLE_VALUE: bool = true
Used to optimize single value loading of endpoint arguments.
fn multi_decode_or_handle_err<I, H>( input: &mut I, h: H ) -> Result<T, <H as DecodeErrorHandler>::HandledErr>where I: TopDecodeMultiInput, H: DecodeErrorHandler,
fn multi_decode<I>(input: &mut I) -> Result<Self, DecodeError>where I: TopDecodeMultiInput,
§impl<T> TopDecodeMultiLength for Twhere
T: TopEncode + TopDecode,
impl<T> TopDecodeMultiLength for Twhere T: TopEncode + TopDecode,
§impl<T> TopEncodeMulti for Twhere
T: TopEncode,
impl<T> TopEncodeMulti for Twhere T: TopEncode,
§fn multi_encode_or_handle_err<O, H>(
&self,
output: &mut O,
h: H
) -> Result<(), <H as EncodeErrorHandler>::HandledErr>where
O: TopEncodeMultiOutput,
H: EncodeErrorHandler,
fn multi_encode_or_handle_err<O, H>( &self, output: &mut O, h: H ) -> Result<(), <H as EncodeErrorHandler>::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.§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.