Trait Mutate
pub trait Mutate<AccountId, ItemConfig>: Inspect<AccountId> {
Show 14 methods
    // Provided methods
    fn mint_into(
        _collection: &Self::CollectionId,
        _item: &Self::ItemId,
        _who: &AccountId,
        _config: &ItemConfig,
        _deposit_collection_owner: bool,
    ) -> Result<(), DispatchError> { ... }
    fn burn(
        _collection: &Self::CollectionId,
        _item: &Self::ItemId,
        _maybe_check_owner: Option<&AccountId>,
    ) -> Result<(), DispatchError> { ... }
    fn set_attribute(
        _collection: &Self::CollectionId,
        _item: &Self::ItemId,
        _key: &[u8],
        _value: &[u8],
    ) -> Result<(), DispatchError> { ... }
    fn set_typed_attribute<K, V>(
        collection: &Self::CollectionId,
        item: &Self::ItemId,
        key: &K,
        value: &V,
    ) -> Result<(), DispatchError>
       where K: Encode,
             V: Encode { ... }
    fn set_collection_attribute(
        _collection: &Self::CollectionId,
        _key: &[u8],
        _value: &[u8],
    ) -> Result<(), DispatchError> { ... }
    fn set_typed_collection_attribute<K, V>(
        collection: &Self::CollectionId,
        key: &K,
        value: &V,
    ) -> Result<(), DispatchError>
       where K: Encode,
             V: Encode { ... }
    fn set_item_metadata(
        _who: Option<&AccountId>,
        _collection: &Self::CollectionId,
        _item: &Self::ItemId,
        _data: &[u8],
    ) -> Result<(), DispatchError> { ... }
    fn set_collection_metadata(
        _who: Option<&AccountId>,
        _collection: &Self::CollectionId,
        _data: &[u8],
    ) -> Result<(), DispatchError> { ... }
    fn clear_attribute(
        _collection: &Self::CollectionId,
        _item: &Self::ItemId,
        _key: &[u8],
    ) -> Result<(), DispatchError> { ... }
    fn clear_typed_attribute<K>(
        collection: &Self::CollectionId,
        item: &Self::ItemId,
        key: &K,
    ) -> Result<(), DispatchError>
       where K: Encode { ... }
    fn clear_collection_attribute(
        _collection: &Self::CollectionId,
        _key: &[u8],
    ) -> Result<(), DispatchError> { ... }
    fn clear_typed_collection_attribute<K>(
        collection: &Self::CollectionId,
        key: &K,
    ) -> Result<(), DispatchError>
       where K: Encode { ... }
    fn clear_item_metadata(
        _who: Option<&AccountId>,
        _collection: &Self::CollectionId,
        _item: &Self::ItemId,
    ) -> Result<(), DispatchError> { ... }
    fn clear_collection_metadata(
        _who: Option<&AccountId>,
        _collection: &Self::CollectionId,
    ) -> Result<(), DispatchError> { ... }
}Expand description
Trait for providing an interface for multiple collections of NFT-like items which may be minted, burned and/or have attributes and metadata set on them.
Provided Methods§
fn mint_into(
    _collection: &Self::CollectionId,
    _item: &Self::ItemId,
    _who: &AccountId,
    _config: &ItemConfig,
    _deposit_collection_owner: bool,
) -> Result<(), DispatchError>
fn mint_into( _collection: &Self::CollectionId, _item: &Self::ItemId, _who: &AccountId, _config: &ItemConfig, _deposit_collection_owner: bool, ) -> Result<(), DispatchError>
Mint some item of collection to be owned by who.
By default, this is not a supported operation.
fn burn(
    _collection: &Self::CollectionId,
    _item: &Self::ItemId,
    _maybe_check_owner: Option<&AccountId>,
) -> Result<(), DispatchError>
fn burn( _collection: &Self::CollectionId, _item: &Self::ItemId, _maybe_check_owner: Option<&AccountId>, ) -> Result<(), DispatchError>
Burn some item of collection.
By default, this is not a supported operation.
fn set_attribute(
    _collection: &Self::CollectionId,
    _item: &Self::ItemId,
    _key: &[u8],
    _value: &[u8],
) -> Result<(), DispatchError>
fn set_attribute( _collection: &Self::CollectionId, _item: &Self::ItemId, _key: &[u8], _value: &[u8], ) -> Result<(), DispatchError>
Set attribute value of item of collection’s key.
By default, this is not a supported operation.
fn set_typed_attribute<K, V>(
    collection: &Self::CollectionId,
    item: &Self::ItemId,
    key: &K,
    value: &V,
) -> Result<(), DispatchError>
fn set_typed_attribute<K, V>( collection: &Self::CollectionId, item: &Self::ItemId, key: &K, value: &V, ) -> Result<(), DispatchError>
Attempt to set the strongly-typed attribute value of item of collection’s key.
By default this just attempts to use set_attribute.
fn set_collection_attribute(
    _collection: &Self::CollectionId,
    _key: &[u8],
    _value: &[u8],
) -> Result<(), DispatchError>
fn set_collection_attribute( _collection: &Self::CollectionId, _key: &[u8], _value: &[u8], ) -> Result<(), DispatchError>
Set attribute value of collection’s key.
By default, this is not a supported operation.
fn set_typed_collection_attribute<K, V>(
    collection: &Self::CollectionId,
    key: &K,
    value: &V,
) -> Result<(), DispatchError>
fn set_typed_collection_attribute<K, V>( collection: &Self::CollectionId, key: &K, value: &V, ) -> Result<(), DispatchError>
Attempt to set the strongly-typed attribute value of collection’s key.
By default this just attempts to use set_attribute.
fn set_item_metadata(
    _who: Option<&AccountId>,
    _collection: &Self::CollectionId,
    _item: &Self::ItemId,
    _data: &[u8],
) -> Result<(), DispatchError>
fn set_item_metadata( _who: Option<&AccountId>, _collection: &Self::CollectionId, _item: &Self::ItemId, _data: &[u8], ) -> Result<(), DispatchError>
Set the metadata data of an item of collection.
By default, this is not a supported operation.
fn set_collection_metadata(
    _who: Option<&AccountId>,
    _collection: &Self::CollectionId,
    _data: &[u8],
) -> Result<(), DispatchError>
fn set_collection_metadata( _who: Option<&AccountId>, _collection: &Self::CollectionId, _data: &[u8], ) -> Result<(), DispatchError>
Set the metadata data of a collection.
By default, this is not a supported operation.
fn clear_attribute(
    _collection: &Self::CollectionId,
    _item: &Self::ItemId,
    _key: &[u8],
) -> Result<(), DispatchError>
fn clear_attribute( _collection: &Self::CollectionId, _item: &Self::ItemId, _key: &[u8], ) -> Result<(), DispatchError>
Clear attribute of item of collection’s key.
By default, this is not a supported operation.
fn clear_typed_attribute<K>(
    collection: &Self::CollectionId,
    item: &Self::ItemId,
    key: &K,
) -> Result<(), DispatchError>where
    K: Encode,
fn clear_typed_attribute<K>(
    collection: &Self::CollectionId,
    item: &Self::ItemId,
    key: &K,
) -> Result<(), DispatchError>where
    K: Encode,
Attempt to clear the strongly-typed attribute of item of collection’s key.
By default this just attempts to use clear_attribute.
fn clear_collection_attribute(
    _collection: &Self::CollectionId,
    _key: &[u8],
) -> Result<(), DispatchError>
fn clear_collection_attribute( _collection: &Self::CollectionId, _key: &[u8], ) -> Result<(), DispatchError>
Clear attribute of collection’s key.
By default, this is not a supported operation.
fn clear_typed_collection_attribute<K>(
    collection: &Self::CollectionId,
    key: &K,
) -> Result<(), DispatchError>where
    K: Encode,
fn clear_typed_collection_attribute<K>(
    collection: &Self::CollectionId,
    key: &K,
) -> Result<(), DispatchError>where
    K: Encode,
Attempt to clear the strongly-typed attribute of collection’s key.
By default this just attempts to use clear_attribute.
fn clear_item_metadata(
    _who: Option<&AccountId>,
    _collection: &Self::CollectionId,
    _item: &Self::ItemId,
) -> Result<(), DispatchError>
fn clear_item_metadata( _who: Option<&AccountId>, _collection: &Self::CollectionId, _item: &Self::ItemId, ) -> Result<(), DispatchError>
Clear the metadata of an item of collection.
By default, this is not a supported operation.
fn clear_collection_metadata(
    _who: Option<&AccountId>,
    _collection: &Self::CollectionId,
) -> Result<(), DispatchError>
fn clear_collection_metadata( _who: Option<&AccountId>, _collection: &Self::CollectionId, ) -> Result<(), DispatchError>
Clear the metadata of a collection.
By default, this is not a supported operation.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.