Enum dharitri_wasm::types::DctLocalRole
source · pub enum DctLocalRole {
None,
Mint,
Burn,
NftCreate,
NftAddQuantity,
NftBurn,
}Variants§
Implementations§
source§impl DctLocalRole
impl DctLocalRole
pub fn as_u8(&self) -> u8
pub fn as_role_name(&self) -> &'static [u8]
pub fn to_flag(&self) -> DctLocalRoleFlags
source§impl DctLocalRole
impl DctLocalRole
pub fn iter_all() -> Iter<'static, DctLocalRole>
Trait Implementations§
source§impl Clone for DctLocalRole
impl Clone for DctLocalRole
source§fn clone(&self) -> DctLocalRole
fn clone(&self) -> DctLocalRole
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 DctLocalRole
impl Debug for DctLocalRole
source§impl<'a> From<&'a [u8]> for DctLocalRole
impl<'a> From<&'a [u8]> for DctLocalRole
source§impl From<u8> for DctLocalRole
impl From<u8> for DctLocalRole
source§impl ManagedVecItem for DctLocalRole
impl ManagedVecItem for DctLocalRole
source§const PAYLOAD_SIZE: usize = 1usize
const PAYLOAD_SIZE: usize = 1usize
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).§type Ref<'a> = DctLocalRole
type Ref<'a> = DctLocalRole
Reference representation of the ManagedVec item. Read more
source§fn from_byte_reader<Reader: FnMut(&mut [u8])>(reader: Reader) -> Self
fn from_byte_reader<Reader: FnMut(&mut [u8])>(reader: Reader) -> Self
Parses given bytes as a an owned object.
source§unsafe fn from_byte_reader_as_borrow<'a, Reader: FnMut(&mut [u8])>(
reader: Reader
) -> Self::Ref<'a>
unsafe fn from_byte_reader_as_borrow<'a, Reader: FnMut(&mut [u8])>( reader: Reader ) -> Self::Ref<'a>
Parses given bytes as a representation of the object, either owned, or a reference. Read more
fn to_byte_writer<R, Writer: FnMut(&[u8]) -> R>(&self, writer: Writer) -> R
source§impl NestedDecode for DctLocalRole
impl NestedDecode for DctLocalRole
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 NestedEncode for DctLocalRole
impl NestedEncode for DctLocalRole
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 PartialEq for DctLocalRole
impl PartialEq for DctLocalRole
source§fn eq(&self, other: &DctLocalRole) -> bool
fn eq(&self, other: &DctLocalRole) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl TopDecode for DctLocalRole
impl TopDecode for DctLocalRole
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 TopEncode for DctLocalRole
impl TopEncode for DctLocalRole
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 TypeAbi for DctLocalRole
impl TypeAbi for DctLocalRole
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 Copy for DctLocalRole
impl StructuralPartialEq for DctLocalRole
Auto Trait Implementations§
impl RefUnwindSafe for DctLocalRole
impl Send for DctLocalRole
impl Sync for DctLocalRole
impl Unpin for DctLocalRole
impl UnwindSafe for DctLocalRole
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> ContractCallArg for Twhere
T: TopEncode,
impl<T> ContractCallArg for Twhere
T: TopEncode,
fn push_dyn_arg<O>(&self, output: &mut O)where
O: DynArgOutput,
source§impl<T> EndpointResult for Twhere
T: TopEncode,
impl<T> EndpointResult for Twhere
T: TopEncode,
§type DecodeAs = T
type DecodeAs = T
Indicates how the result of the endpoint can be interpreted when called via proxy.
Self for most types.