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

Trait Inspect

Source
pub trait Inspect<Strategy: InspectStrategy>: AssetDefinition {
    // Required method
    fn inspect(
        id: &Self::Id,
        strategy: Strategy,
    ) -> Result<Strategy::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§

Source

fn inspect( id: &Self::Id, strategy: Strategy, ) -> Result<Strategy::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>>