Trait frame_support::traits::tokens::nonfungible::Mutate
source · pub trait Mutate<AccountId>: Inspect<AccountId> {
// Provided methods
fn mint_into(_item: &Self::ItemId, _who: &AccountId) -> DispatchResult { ... }
fn burn(
_item: &Self::ItemId,
_maybe_check_owner: Option<&AccountId>,
) -> DispatchResult { ... }
fn set_attribute(
_item: &Self::ItemId,
_key: &[u8],
_value: &[u8],
) -> DispatchResult { ... }
fn set_typed_attribute<K: Encode, V: Encode>(
item: &Self::ItemId,
key: &K,
value: &V,
) -> DispatchResult { ... }
}
Expand description
Trait for providing an interface for NFT-like items which may be minted, burned and/or have attributes set on them.
Provided Methods§
sourcefn mint_into(_item: &Self::ItemId, _who: &AccountId) -> DispatchResult
fn mint_into(_item: &Self::ItemId, _who: &AccountId) -> DispatchResult
Mint some item
to be owned by who
.
By default, this is not a supported operation.
sourcefn burn(
_item: &Self::ItemId,
_maybe_check_owner: Option<&AccountId>,
) -> DispatchResult
fn burn( _item: &Self::ItemId, _maybe_check_owner: Option<&AccountId>, ) -> DispatchResult
Burn some item
.
By default, this is not a supported operation.
sourcefn set_attribute(
_item: &Self::ItemId,
_key: &[u8],
_value: &[u8],
) -> DispatchResult
fn set_attribute( _item: &Self::ItemId, _key: &[u8], _value: &[u8], ) -> DispatchResult
Set attribute value
of item
’s key
.
By default, this is not a supported operation.
sourcefn set_typed_attribute<K: Encode, V: Encode>(
item: &Self::ItemId,
key: &K,
value: &V,
) -> DispatchResult
fn set_typed_attribute<K: Encode, V: Encode>( item: &Self::ItemId, key: &K, value: &V, ) -> DispatchResult
Attempt to set the strongly-typed attribute value
of item
’s key
.
By default this just attempts to use set_attribute
.
Object Safety§
This trait is not object safe.