pub enum AssetInstance {
Undefined,
Index(u128),
Array4([u8; 4]),
Array8([u8; 8]),
Array16([u8; 16]),
Array32([u8; 32]),
}Expand description
A general identifier for an instance of a non-fungible asset class.
Variants§
Undefined
Undefined - used if the non-fungible asset class has only one instance.
Index(u128)
A compact index. Technically this could be greater than u128, but this implementation
supports only values up to 2**128 - 1.
Array4([u8; 4])
A 4-byte fixed-length datum.
Array8([u8; 8])
An 8-byte fixed-length datum.
Array16([u8; 16])
A 16-byte fixed-length datum.
Array32([u8; 32])
A 32-byte fixed-length datum.
Trait Implementations§
Source§impl Clone for AssetInstance
impl Clone for AssetInstance
Source§fn clone(&self) -> AssetInstance
fn clone(&self) -> AssetInstance
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AssetInstance
impl Debug for AssetInstance
Source§impl Decode for AssetInstance
impl Decode for AssetInstance
Source§fn decode<__CodecInputEdqy>(
__codec_input_edqy: &mut __CodecInputEdqy,
) -> Result<AssetInstance, Error>where
__CodecInputEdqy: Input,
fn decode<__CodecInputEdqy>(
__codec_input_edqy: &mut __CodecInputEdqy,
) -> Result<AssetInstance, Error>where
__CodecInputEdqy: Input,
Attempt to deserialise the value from input.
Source§fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>,
) -> Result<DecodeFinished, Error>where
I: Input,
fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>,
) -> Result<DecodeFinished, Error>where
I: Input,
Attempt to deserialize the value from input into a pre-allocated piece of memory. Read more
Source§impl<'de> Deserialize<'de> for AssetInstance
impl<'de> Deserialize<'de> for AssetInstance
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<AssetInstance, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<AssetInstance, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Encode for AssetInstance
impl Encode for AssetInstance
Source§fn size_hint(&self) -> usize
fn size_hint(&self) -> usize
If possible give a hint of expected size of the encoding. Read more
Source§fn encode_to<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)
fn encode_to<__CodecOutputEdqy>( &self, __codec_dest_edqy: &mut __CodecOutputEdqy, )
Convert self to a slice and append it to the destination.
Source§fn using_encoded<R, F>(&self, f: F) -> R
fn using_encoded<R, F>(&self, f: F) -> R
Convert self to a slice and then invoke the given closure with it.
Source§fn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
Calculates the encoded size. Read more
Source§impl From<()> for AssetInstance
impl From<()> for AssetInstance
Source§fn from(_: ()) -> AssetInstance
fn from(_: ()) -> AssetInstance
Converts to this type from the input type.
Source§impl From<u16> for AssetInstance
impl From<u16> for AssetInstance
Source§fn from(x: u16) -> AssetInstance
fn from(x: u16) -> AssetInstance
Converts to this type from the input type.
Source§impl From<u32> for AssetInstance
impl From<u32> for AssetInstance
Source§fn from(x: u32) -> AssetInstance
fn from(x: u32) -> AssetInstance
Converts to this type from the input type.
Source§impl From<u64> for AssetInstance
impl From<u64> for AssetInstance
Source§fn from(x: u64) -> AssetInstance
fn from(x: u64) -> AssetInstance
Converts to this type from the input type.
Source§impl From<u8> for AssetInstance
impl From<u8> for AssetInstance
Source§fn from(x: u8) -> AssetInstance
fn from(x: u8) -> AssetInstance
Converts to this type from the input type.
Source§impl MaxEncodedLen for AssetInstance
impl MaxEncodedLen for AssetInstance
Source§fn max_encoded_len() -> usize
fn max_encoded_len() -> usize
Upper bound, in bytes, of the maximum encoded size of this item.
Source§impl Ord for AssetInstance
impl Ord for AssetInstance
Source§impl PartialEq for AssetInstance
impl PartialEq for AssetInstance
Source§impl PartialOrd for AssetInstance
impl PartialOrd for AssetInstance
Source§impl Serialize for AssetInstance
impl Serialize for AssetInstance
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§impl TryFrom<AssetInstance> for AssetInstance
impl TryFrom<AssetInstance> for AssetInstance
Source§fn try_from(
value: AssetInstance,
) -> Result<AssetInstance, <AssetInstance as TryFrom<AssetInstance>>::Error>
fn try_from( value: AssetInstance, ) -> Result<AssetInstance, <AssetInstance as TryFrom<AssetInstance>>::Error>
Performs the conversion.
Source§impl TypeInfo for AssetInstance
impl TypeInfo for AssetInstance
impl Copy for AssetInstance
impl DecodeWithMemTracking for AssetInstance
impl EncodeLike for AssetInstance
impl Eq for AssetInstance
impl StructuralPartialEq for AssetInstance
Auto Trait Implementations§
impl Freeze for AssetInstance
impl RefUnwindSafe for AssetInstance
impl Send for AssetInstance
impl Sync for AssetInstance
impl Unpin for AssetInstance
impl UnwindSafe for AssetInstance
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§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> CheckedConversion for T
impl<T> CheckedConversion for T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<T> DecodeLimit for Twhere
T: Decode,
impl<T> DecodeLimit for Twhere
T: Decode,
Source§impl<T> DecodeWithMemLimit for Twhere
T: DecodeWithMemTracking,
impl<T> DecodeWithMemLimit for Twhere
T: DecodeWithMemTracking,
Source§impl<T> DefensiveMax<T> for Twhere
T: PartialOrd,
impl<T> DefensiveMax<T> for Twhere
T: PartialOrd,
Source§fn defensive_max(self, other: T) -> T
fn defensive_max(self, other: T) -> T
Source§fn defensive_strict_max(self, other: T) -> T
fn defensive_strict_max(self, other: T) -> T
Source§impl<T> DefensiveMin<T> for Twhere
T: PartialOrd,
impl<T> DefensiveMin<T> for Twhere
T: PartialOrd,
Source§fn defensive_min(self, other: T) -> T
fn defensive_min(self, other: T) -> T
Source§fn defensive_strict_min(self, other: T) -> T
fn defensive_strict_min(self, other: T) -> T
Source§impl<T, U> DefensiveTruncateInto<U> for Twhere
U: DefensiveTruncateFrom<T>,
impl<T, U> DefensiveTruncateInto<U> for Twhere
U: DefensiveTruncateFrom<T>,
Source§fn defensive_truncate_into(self) -> U
fn defensive_truncate_into(self) -> U
Defensively truncate a value and convert it into its bounded form.
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§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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<Src, Dest> IntoTuple<Dest> for Srcwhere
Dest: FromTuple<Src>,
impl<Src, Dest> IntoTuple<Dest> for Srcwhere
Dest: FromTuple<Src>,
fn into_tuple(self) -> Dest
Source§impl<T, Outer> IsWrappedBy<Outer> for T
impl<T, Outer> IsWrappedBy<Outer> for T
Source§impl<T> SaturatedConversion for T
impl<T> SaturatedConversion for T
Source§fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
Source§fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
Consume self to return an equivalent value of
T. Read moreSource§impl<T, U> TryIntoKey<U> for Twhere
U: TryFromKey<T>,
impl<T, U> TryIntoKey<U> for Twhere
U: TryFromKey<T>,
type Error = <U as TryFromKey<T>>::Error
fn try_into_key(self) -> Result<U, <U as TryFromKey<T>>::Error>
Source§impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
Source§fn unchecked_into(self) -> T
fn unchecked_into(self) -> T
The counterpart to
unchecked_from.Source§impl<T, S> UniqueSaturatedInto<T> for S
impl<T, S> UniqueSaturatedInto<T> for S
Source§fn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
Consume self to return an equivalent value of
T.