referrerpolicy=no-referrer-when-downgrade
frame_support::traits::tokens::nonfungibles

Trait InspectEnumerable

Source
pub trait InspectEnumerable<AccountId>: Inspect<AccountId> {
    type CollectionsIterator: Iterator<Item = Self::CollectionId>;
    type ItemsIterator: Iterator<Item = Self::ItemId>;
    type OwnedIterator: Iterator<Item = (Self::CollectionId, Self::ItemId)>;
    type OwnedInCollectionIterator: Iterator<Item = Self::ItemId>;

    // Required methods
    fn collections() -> Self::CollectionsIterator;
    fn items(collection: &Self::CollectionId) -> Self::ItemsIterator;
    fn owned(who: &AccountId) -> Self::OwnedIterator;
    fn owned_in_collection(
        collection: &Self::CollectionId,
        who: &AccountId,
    ) -> Self::OwnedInCollectionIterator;
}
Expand description

Interface for enumerating items in existence or owned by a given account over many collections of NFTs.

Required Associated Types§

Source

type CollectionsIterator: Iterator<Item = Self::CollectionId>

The iterator type for Self::collections.

Source

type ItemsIterator: Iterator<Item = Self::ItemId>

The iterator type for Self::items.

Source

type OwnedIterator: Iterator<Item = (Self::CollectionId, Self::ItemId)>

The iterator type for Self::owned.

Source

type OwnedInCollectionIterator: Iterator<Item = Self::ItemId>

The iterator type for Self::owned_in_collection.

Required Methods§

Source

fn collections() -> Self::CollectionsIterator

Returns an iterator of the collections in existence.

Source

fn items(collection: &Self::CollectionId) -> Self::ItemsIterator

Returns an iterator of the items of a collection in existence.

Source

fn owned(who: &AccountId) -> Self::OwnedIterator

Returns an iterator of the items of all collections owned by who.

Source

fn owned_in_collection( collection: &Self::CollectionId, who: &AccountId, ) -> Self::OwnedInCollectionIterator

Returns an iterator of the items of collection owned by who.

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.

Implementors§

impl<T: Config<I>, I: 'static> InspectEnumerable<<T as Config>::AccountId> for Pallet<T, I>