pub struct NftOutput { /* private fields */ }Expand description
Describes an NFT output, a globally unique token with metadata attached.
Implementations§
Source§impl NftOutput
impl NftOutput
Sourcepub const KIND: u8 = 6u8
pub const KIND: u8 = 6u8
The super::Output kind of an NftOutput.
Sourcepub const ALLOWED_UNLOCK_CONDITIONS: UnlockConditionFlags
pub const ALLOWED_UNLOCK_CONDITIONS: UnlockConditionFlags
The set of allowed UnlockConditions for an NftOutput.
Sourcepub const ALLOWED_FEATURES: FeatureFlags
pub const ALLOWED_FEATURES: FeatureFlags
Sourcepub const ALLOWED_IMMUTABLE_FEATURES: FeatureFlags
pub const ALLOWED_IMMUTABLE_FEATURES: FeatureFlags
Sourcepub fn build_with_amount(amount: u64, nft_id: NftId) -> NftOutputBuilder
pub fn build_with_amount(amount: u64, nft_id: NftId) -> NftOutputBuilder
Creates a new NftOutputBuilder with a provided amount.
Sourcepub fn native_tokens(&self) -> &NativeTokens
pub fn native_tokens(&self) -> &NativeTokens
Sourcepub fn nft_id_non_null(&self, output_id: &OutputId) -> NftId
pub fn nft_id_non_null(&self, output_id: &OutputId) -> NftId
Returns the nft ID if not null, or creates it from the output ID.
Sourcepub fn unlock_conditions(&self) -> &UnlockConditions
pub fn unlock_conditions(&self) -> &UnlockConditions
Sourcepub fn immutable_features(&self) -> &Features
pub fn immutable_features(&self) -> &Features
Sourcepub fn nft_address(&self, output_id: &OutputId) -> NftAddress
pub fn nft_address(&self, output_id: &OutputId) -> NftAddress
Returns the nft address for this output.
Trait Implementations§
Source§impl From<&NftOutput> for NftOutputBuilder
impl From<&NftOutput> for NftOutputBuilder
Source§impl Ord for NftOutput
impl Ord for NftOutput
Source§impl Packable for NftOutput
impl Packable for NftOutput
Source§type UnpackError = Error
type UnpackError = Error
The error type that can be returned if some semantic error occurs while unpacking. Read more
Source§type UnpackVisitor = <u64 as Packable>::UnpackVisitor
type UnpackVisitor = <u64 as Packable>::UnpackVisitor
FIXME: docs
Source§impl PartialOrd for NftOutput
impl PartialOrd for NftOutput
impl Eq for NftOutput
impl StructuralPartialEq for NftOutput
Auto Trait Implementations§
impl Freeze for NftOutput
impl RefUnwindSafe for NftOutput
impl Send for NftOutput
impl Sync for NftOutput
impl Unpin for NftOutput
impl UnwindSafe for NftOutput
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<P> PackableExt for Pwhere
P: Packable,
impl<P> PackableExt for Pwhere
P: Packable,
§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]>].
§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.
§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.