Enum identity_iota::iota::block::output::TokenScheme
source · pub enum TokenScheme {
Simple(SimpleTokenScheme),
}
Expand description
Variants§
Simple(SimpleTokenScheme)
Implementations§
source§impl TokenScheme
impl TokenScheme
sourcepub fn kind(&self) -> u8
pub fn kind(&self) -> u8
Returns the token scheme kind of a TokenScheme
.
sourcepub fn is_simple(&self) -> bool
pub fn is_simple(&self) -> bool
Checks whether the token scheme is a SimpleTokenScheme
.
sourcepub fn as_simple(&self) -> &SimpleTokenScheme
pub fn as_simple(&self) -> &SimpleTokenScheme
Gets the token scheme as an actual SimpleTokenScheme
.
PANIC: do not call on a non-simple token scheme.
Trait Implementations§
source§impl Clone for TokenScheme
impl Clone for TokenScheme
source§fn clone(&self) -> TokenScheme
fn clone(&self) -> TokenScheme
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 TokenScheme
impl Debug for TokenScheme
source§impl From<&TokenScheme> for TokenSchemeDto
impl From<&TokenScheme> for TokenSchemeDto
source§fn from(value: &TokenScheme) -> TokenSchemeDto
fn from(value: &TokenScheme) -> TokenSchemeDto
Converts to this type from the input type.
source§impl From<SimpleTokenScheme> for TokenScheme
impl From<SimpleTokenScheme> for TokenScheme
source§fn from(original: SimpleTokenScheme) -> TokenScheme
fn from(original: SimpleTokenScheme) -> TokenScheme
Converts to this type from the input type.
source§impl Hash for TokenScheme
impl Hash for TokenScheme
source§impl Ord for TokenScheme
impl Ord for TokenScheme
source§fn cmp(&self, other: &TokenScheme) -> Ordering
fn cmp(&self, other: &TokenScheme) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl Packable for TokenScheme
impl Packable for TokenScheme
§type UnpackError = Error
type UnpackError = Error
The error type that can be returned if some semantic error occurs while unpacking. Read more
§type UnpackVisitor = <SimpleTokenScheme as Packable>::UnpackVisitor
type UnpackVisitor = <SimpleTokenScheme as Packable>::UnpackVisitor
FIXME: docs
source§fn pack<P>(&self, packer: &mut P) -> Result<(), <P as Packer>::Error>where
P: Packer,
fn pack<P>(&self, packer: &mut P) -> Result<(), <P as Packer>::Error>where
P: Packer,
Packs this value into the given
Packer
.source§fn unpack<U, const VERIFY: bool>(
unpacker: &mut U,
visitor: &<TokenScheme as Packable>::UnpackVisitor
) -> Result<TokenScheme, UnpackError<<TokenScheme as Packable>::UnpackError, <U as Unpacker>::Error>>where
U: Unpacker,
fn unpack<U, const VERIFY: bool>(
unpacker: &mut U,
visitor: &<TokenScheme as Packable>::UnpackVisitor
) -> Result<TokenScheme, UnpackError<<TokenScheme as Packable>::UnpackError, <U as Unpacker>::Error>>where
U: Unpacker,
Unpacks this value from the given
Unpacker
. The VERIFY
generic parameter can be used to skip additional
syntactic checks.source§impl PartialEq for TokenScheme
impl PartialEq for TokenScheme
source§fn eq(&self, other: &TokenScheme) -> bool
fn eq(&self, other: &TokenScheme) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for TokenScheme
impl PartialOrd for TokenScheme
source§fn partial_cmp(&self, other: &TokenScheme) -> Option<Ordering>
fn partial_cmp(&self, other: &TokenScheme) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl TryFrom<TokenSchemeDto> for TokenScheme
impl TryFrom<TokenSchemeDto> for TokenScheme
source§fn try_from(
value: TokenSchemeDto
) -> Result<TokenScheme, <TokenScheme as TryFrom<TokenSchemeDto>>::Error>
fn try_from( value: TokenSchemeDto ) -> Result<TokenScheme, <TokenScheme as TryFrom<TokenSchemeDto>>::Error>
Performs the conversion.
impl Eq for TokenScheme
impl StructuralPartialEq for TokenScheme
Auto Trait Implementations§
impl Freeze for TokenScheme
impl RefUnwindSafe for TokenScheme
impl Send for TokenScheme
impl Sync for TokenScheme
impl Unpin for TokenScheme
impl UnwindSafe for TokenScheme
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.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<P> PackableExt for Pwhere
P: Packable,
impl<P> PackableExt for Pwhere
P: Packable,
source§fn unpack_verified<T>(
bytes: T,
visitor: &<P as Packable>::UnpackVisitor
) -> Result<P, UnpackError<<P as Packable>::UnpackError, UnexpectedEOF>>
fn unpack_verified<T>( bytes: T, visitor: &<P as Packable>::UnpackVisitor ) -> Result<P, UnpackError<<P as Packable>::UnpackError, UnexpectedEOF>>
Unpacks this value from a type that implements [AsRef<[u8]>
].
source§fn unpack_unverified<T>(
bytes: T
) -> Result<P, UnpackError<<P as Packable>::UnpackError, UnexpectedEOF>>
fn unpack_unverified<T>( bytes: T ) -> Result<P, UnpackError<<P as Packable>::UnpackError, UnexpectedEOF>>
Unpacks this value from a type that implements [AsRef<[u8]>
] skipping some syntatical checks.
source§fn packed_len(&self) -> usize
fn packed_len(&self) -> usize
Returns the length in bytes of the value after being packed. The returned value always matches the number of
bytes written using
pack
.