Struct concordium_cis2::TokenIdUnit
source · pub struct TokenIdUnit();
Expand description
Token Identifier, which combined with the address of the contract instance, forms the unique identifier of a token type.
The CIS2 specification allows for up to 255 bytes for the token ID, but for most cases using a smaller token ID is fine and can reduce contract energy costs.
This token ID uses Unit for representing token IDs, which means only one
token ID can be represented with this type and other token IDs cannot be
represented. For a more general token ID type see TokenIdVec
.
Trait Implementations§
source§impl Clone for TokenIdUnit
impl Clone for TokenIdUnit
source§fn clone(&self) -> TokenIdUnit
fn clone(&self) -> TokenIdUnit
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 TokenIdUnit
impl Debug for TokenIdUnit
source§impl Deserial for TokenIdUnit
impl Deserial for TokenIdUnit
The TokenIdUnit
will deserialize one byte ensuring this contains the value
0. It will result in an error if the byte is not 0.
source§impl Hash for TokenIdUnit
impl Hash for TokenIdUnit
source§impl Ord for TokenIdUnit
impl Ord for TokenIdUnit
source§fn cmp(&self, other: &TokenIdUnit) -> Ordering
fn cmp(&self, other: &TokenIdUnit) -> 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 PartialEq for TokenIdUnit
impl PartialEq for TokenIdUnit
source§fn eq(&self, other: &TokenIdUnit) -> bool
fn eq(&self, other: &TokenIdUnit) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for TokenIdUnit
impl PartialOrd for TokenIdUnit
source§fn partial_cmp(&self, other: &TokenIdUnit) -> Option<Ordering>
fn partial_cmp(&self, other: &TokenIdUnit) -> 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 Serial for TokenIdUnit
impl Serial for TokenIdUnit
The TokenIdUnit
is serialized with one byte with the value 0.
impl Copy for TokenIdUnit
impl Eq for TokenIdUnit
impl IsTokenId for TokenIdUnit
impl StructuralPartialEq for TokenIdUnit
Auto Trait Implementations§
impl RefUnwindSafe for TokenIdUnit
impl Send for TokenIdUnit
impl Sync for TokenIdUnit
impl Unpin for TokenIdUnit
impl UnwindSafe for TokenIdUnit
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