Struct chain_impl_mockchain::tokens::name::TokenName
source · pub struct TokenName(Vec<u8>);
Expand description
A sequence of bytes serving as a token name. Tokens that share the same name but have different voting policies hashes are different tokens. A name can be empty. The maximum length of a token name is 32 bytes.
Tuple Fields§
§0: Vec<u8>
Implementations§
Trait Implementations§
source§impl Arbitrary for TokenName
impl Arbitrary for TokenName
§type Parameters = ()
type Parameters = ()
The type of parameters that
arbitrary_with
accepts for configuration
of the generated Strategy
. Parameters must implement Default
.source§fn arbitrary_with(args: <Self as Arbitrary>::Parameters) -> Self::Strategy
fn arbitrary_with(args: <Self as Arbitrary>::Parameters) -> Self::Strategy
source§impl Deserialize for TokenName
impl Deserialize for TokenName
fn deserialize<R: Read>(codec: &mut Codec<R>) -> Result<Self, ReadError>
fn deserialize_validate<R>(codec: &mut Codec<R>) -> Result<(), ReadError>where R: Read,
source§impl Ord for TokenName
impl Ord for TokenName
source§impl PartialEq<TokenName> for TokenName
impl PartialEq<TokenName> for TokenName
source§impl PartialOrd<TokenName> for TokenName
impl PartialOrd<TokenName> for TokenName
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 Serialize for TokenName
impl Serialize for TokenName
impl Eq for TokenName
impl StructuralEq for TokenName
impl StructuralPartialEq for TokenName
Auto Trait Implementations§
impl RefUnwindSafe for TokenName
impl Send for TokenName
impl Sync for TokenName
impl Unpin for TokenName
impl UnwindSafe for TokenName
Blanket Implementations§
§impl<T> Base32Len for Twhere
T: AsRef<[u8]>,
impl<T> Base32Len for Twhere T: AsRef<[u8]>,
§fn base32_len(&self) -> usize
fn base32_len(&self) -> usize
Calculate the base32 serialized length
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
§impl<T> DeserializeFromSlice for Twhere
T: Deserialize,
impl<T> DeserializeFromSlice for Twhere T: Deserialize,
fn deserialize_from_slice(codec: &mut Codec<&[u8]>) -> Result<T, ReadError>
fn deserialize_validate_from_slice( codec: &mut Codec<&[u8]> ) -> Result<(), ReadError>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T> ToHex for Twhere
T: AsRef<[u8]>,
impl<T> ToHex for Twhere T: AsRef<[u8]>,
source§fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex<U>(&self) -> Uwhere U: FromIterator<char>,
Encode the hex strict representing
self
into the result. Lower case
letters are used (e.g. f9b4ca
)source§fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex_upper<U>(&self) -> Uwhere U: FromIterator<char>,
Encode the hex strict representing
self
into the result. Upper case
letters are used (e.g. F9B4CA
)