referrerpolicy=no-referrer-when-downgrade

Trait Inspect

pub trait Inspect<Strategy>: AssetDefinition
where Strategy: InspectStrategy,
{ // Required method fn inspect( id: &Self::Id, strategy: Strategy, ) -> Result<<Strategy as InspectStrategy>::Value, DispatchError>; }
Expand description

A trait representing the ability of a certain asset to provide its state information.

This trait can be implemented multiple times using different inspect strategies.

An inspect strategy defines how the asset state is identified/retrieved and what Value type is returned.

Required Methods§

fn inspect( id: &Self::Id, strategy: Strategy, ) -> Result<<Strategy as InspectStrategy>::Value, DispatchError>

Inspect state information of the asset using the given id and the inspect strategy.

The ID type is retrieved from the AssetDefinition.

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<'a, T: Config<I>, I: 'static> Inspect<Bytes<Attribute<'a>>> for Collection<Pallet<T, I>>

impl<'a, T: Config<I>, I: 'static> Inspect<Bytes<Attribute<'a>>> for Item<Pallet<T, I>>

impl<T: Config<I>, I: 'static> Inspect<Bytes> for Collection<Pallet<T, I>>

impl<T: Config<I>, I: 'static> Inspect<Bytes> for Item<Pallet<T, I>>

impl<T: Config<I>, I: 'static> Inspect<CanUpdate<Owner<<T as Config>::AccountId>>> for Item<Pallet<T, I>>

impl<T: Config<I>, I: 'static> Inspect<Owner<<T as Config>::AccountId>> for Collection<Pallet<T, I>>

impl<T: Config<I>, I: 'static> Inspect<Owner<<T as Config>::AccountId>> for Item<Pallet<T, I>>