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

Trait Destroy

Source
pub trait Destroy<Strategy: DestroyStrategy>: AssetDefinition {
    // Required method
    fn destroy(
        id: &Self::Id,
        strategy: Strategy,
    ) -> Result<Strategy::Success, DispatchError>;
}
Expand description

A trait representing the ability of a certain asset to be destroyed.

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

A destroy strategy defines destroy parameters and the result value type.

Required Methods§

Source

fn destroy( id: &Self::Id, strategy: Strategy, ) -> Result<Strategy::Success, DispatchError>

Destroy the asset identified by the given id using the provided 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<T: Config<I>, I: 'static> Destroy<CheckOrigin<<T as Config>::RuntimeOrigin, CheckState<Witness<DestroyWitness>>>> for Collection<Pallet<T, I>>

impl<T: Config<I>, I: 'static> Destroy<CheckState<Owner<<T as Config>::AccountId>, CheckState<Witness<DestroyWitness>>>> for Collection<Pallet<T, I>>

impl<T: Config<I>, I: 'static> Destroy<CheckState<Witness<DestroyWitness>>> for Collection<Pallet<T, I>>