referrerpolicy=no-referrer-when-downgrade

Trait Update

pub trait Update<Strategy>: AssetDefinition
where Strategy: UpdateStrategy,
{ // Required method fn update( id: &Self::Id, strategy: Strategy, update_value: <Strategy as UpdateStrategy>::UpdateValue<'_>, ) -> Result<<Strategy as UpdateStrategy>::Success, DispatchError>; }
Expand description

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

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

An update strategy defines how the asset state is identified and what UpdateValue type is used.

Required Methods§

fn update( id: &Self::Id, strategy: Strategy, update_value: <Strategy as UpdateStrategy>::UpdateValue<'_>, ) -> Result<<Strategy as UpdateStrategy>::Success, DispatchError>

Update the state information of the asset using the given id, the update strategy, and the strategy’s update_value.

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> Update<CheckOrigin<<T as Config>::RuntimeOrigin, Owner<<T as Config>::AccountId>>> for Item<Pallet<T, I>>

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

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