Struct dharitri_wasm::types::DctTokenPayment
source · pub struct DctTokenPayment<M: ManagedTypeApi> {
pub token_type: DctTokenType,
pub token_identifier: TokenIdentifier<M>,
pub token_nonce: u64,
pub amount: BigUint<M>,
}Fields§
§token_type: DctTokenType§token_identifier: TokenIdentifier<M>§token_nonce: u64§amount: BigUint<M>Implementations§
source§impl<M: ManagedTypeApi> DctTokenPayment<M>
impl<M: ManagedTypeApi> DctTokenPayment<M>
pub fn no_payment(api: M) -> Self
pub fn new( token_identifier: TokenIdentifier<M>, token_nonce: u64, amount: BigUint<M> ) -> Self
Trait Implementations§
source§impl<M: Clone + ManagedTypeApi> Clone for DctTokenPayment<M>
impl<M: Clone + ManagedTypeApi> Clone for DctTokenPayment<M>
source§fn clone(&self) -> DctTokenPayment<M>
fn clone(&self) -> DctTokenPayment<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 DctTokenPayment<M>
impl<M: Debug + ManagedTypeApi> Debug for DctTokenPayment<M>
source§impl<M: ManagedTypeApi> From<DctTokenPayment<M>> for DctTokenPaymentMultiArg<M>
impl<M: ManagedTypeApi> From<DctTokenPayment<M>> for DctTokenPaymentMultiArg<M>
source§fn from(obj: DctTokenPayment<M>) -> Self
fn from(obj: DctTokenPayment<M>) -> Self
Converts to this type from the input type.
source§impl<M: ManagedTypeApi> ManagedVecItem<M> for DctTokenPayment<M>
impl<M: ManagedTypeApi> ManagedVecItem<M> for DctTokenPayment<M>
source§const PAYLOAD_SIZE: usize = 16usize
const PAYLOAD_SIZE: usize = 16usize
Size of the data stored in the underlying
ManagedBuffer.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).fn from_byte_reader<Reader: FnMut(&mut [u8])>(api: M, reader: Reader) -> Self
fn to_byte_writer<R, Writer: FnMut(&[u8]) -> R>(&self, writer: Writer) -> R
source§impl<M: ManagedTypeApi> NestedDecode for DctTokenPayment<M>
impl<M: ManagedTypeApi> NestedDecode for DctTokenPayment<M>
source§fn dep_decode<I: NestedDecodeInput>(input: &mut I) -> Result<Self, DecodeError>
fn dep_decode<I: NestedDecodeInput>(input: &mut I) -> Result<Self, DecodeError>
Attempt to deserialise the value from input,
using the format of an object nested inside another structure.
In case of success returns the deserialized value and the number of bytes consumed during the operation.
source§fn dep_decode_or_exit<I: NestedDecodeInput, ExitCtx: Clone>(
input: &mut I,
c: ExitCtx,
exit: fn(_: ExitCtx, _: DecodeError) -> !
) -> Self
fn dep_decode_or_exit<I: NestedDecodeInput, ExitCtx: Clone>( input: &mut I, c: ExitCtx, exit: fn(_: ExitCtx, _: DecodeError) -> ! ) -> Self
Version of
top_decode that exits quickly in case of error.
Its purpose is to create smaller implementations
in cases where the application is supposed to exit directly on decode error.source§impl<M: ManagedTypeApi> NestedEncode for DctTokenPayment<M>
impl<M: ManagedTypeApi> NestedEncode for DctTokenPayment<M>
source§fn dep_encode<O: NestedEncodeOutput>(
&self,
dest: &mut O
) -> Result<(), EncodeError>
fn dep_encode<O: NestedEncodeOutput>( &self, dest: &mut O ) -> Result<(), EncodeError>
NestedEncode to output, using the format of an object nested inside another structure.
Does not provide compact version.
source§fn dep_encode_or_exit<O: NestedEncodeOutput, ExitCtx: Clone>(
&self,
dest: &mut O,
c: ExitCtx,
exit: fn(_: ExitCtx, _: EncodeError) -> !
)
fn dep_encode_or_exit<O: NestedEncodeOutput, ExitCtx: Clone>( &self, dest: &mut O, c: ExitCtx, exit: fn(_: ExitCtx, _: EncodeError) -> ! )
Version of
top_decode that exits quickly in case of error.
Its purpose is to create smaller implementations
in cases where the application is supposed to exit directly on decode error.source§impl<M: PartialEq + ManagedTypeApi> PartialEq for DctTokenPayment<M>
impl<M: PartialEq + ManagedTypeApi> PartialEq for DctTokenPayment<M>
source§fn eq(&self, other: &DctTokenPayment<M>) -> bool
fn eq(&self, other: &DctTokenPayment<M>) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl<M: ManagedTypeApi> TopDecode for DctTokenPayment<M>
impl<M: ManagedTypeApi> TopDecode for DctTokenPayment<M>
source§fn top_decode<I: TopDecodeInput>(top_input: I) -> Result<Self, DecodeError>
fn top_decode<I: TopDecodeInput>(top_input: I) -> Result<Self, DecodeError>
Attempt to deserialize the value from input.
source§fn top_decode_or_exit<I: TopDecodeInput, ExitCtx: Clone>(
top_input: I,
c: ExitCtx,
exit: fn(_: ExitCtx, _: DecodeError) -> !
) -> Self
fn top_decode_or_exit<I: TopDecodeInput, ExitCtx: Clone>( top_input: I, c: ExitCtx, exit: fn(_: ExitCtx, _: DecodeError) -> ! ) -> Self
Version of
top_decode that exits quickly in case of error.
Its purpose is to create smaller implementations
in cases where the application is supposed to exit directly on decode error.source§impl<M: ManagedTypeApi> TopEncode for DctTokenPayment<M>
impl<M: ManagedTypeApi> TopEncode for DctTokenPayment<M>
source§fn top_encode<O: TopEncodeOutput>(&self, output: O) -> Result<(), EncodeError>
fn top_encode<O: TopEncodeOutput>(&self, output: O) -> Result<(), EncodeError>
Attempt to serialize the value to ouput.
source§fn top_encode_or_exit<O: TopEncodeOutput, ExitCtx: Clone>(
&self,
output: O,
c: ExitCtx,
exit: fn(_: ExitCtx, _: EncodeError) -> !
)
fn top_encode_or_exit<O: TopEncodeOutput, ExitCtx: Clone>( &self, output: O, c: ExitCtx, exit: fn(_: ExitCtx, _: EncodeError) -> ! )
Version of
top_decode that exits quickly in case of error.
Its purpose is to create smaller bytecode implementations
in cases where the application is supposed to exit directly on decode error.source§impl<M: ManagedTypeApi> TypeAbi for DctTokenPayment<M>
impl<M: ManagedTypeApi> TypeAbi for DctTokenPayment<M>
fn type_name() -> String
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 description.
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: ManagedTypeApi> StructuralPartialEq for DctTokenPayment<M>
Auto Trait Implementations§
impl<M> RefUnwindSafe for DctTokenPayment<M>where
M: RefUnwindSafe,
impl<M> Send for DctTokenPayment<M>where
M: Send,
impl<M> Sync for DctTokenPayment<M>where
M: Sync,
impl<M> Unpin for DctTokenPayment<M>where
M: Unpin,
impl<M> UnwindSafe for DctTokenPayment<M>where
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