pub trait Inspect<AccountId> {
    type InstanceId;
    fn owner(instance: &Self::InstanceId) -> Option<AccountId>;

    fn attribute(_instance: &Self::InstanceId, _key: &[u8]) -> Option<Vec<u8>> { ... }
fn typed_attribute<K: Encode, V: Decode>(
        instance: &Self::InstanceId,
        key: &K
    ) -> Option<V> { ... }
fn can_transfer(_instance: &Self::InstanceId) -> bool { ... } }
Expand description

Trait for providing an interface to a read-only NFT-like set of asset instances.

Associated Types

Type for identifying an asset instance.

Required methods

Returns the owner of asset instance, or None if the asset doesn’t exist or has no owner.

Provided methods

Returns the attribute value of instance corresponding to key.

By default this is None; no attributes are defined.

Returns the strongly-typed attribute value of instance corresponding to key.

By default this just attempts to use attribute.

Returns true if the asset instance may be transferred.

Default implementation is that all assets are transferable.

Implementors