referrerpolicy=no-referrer-when-downgrade

Trait Restore

pub trait Restore<Strategy>: AssetDefinition
where Strategy: RestoreStrategy,
{ // Required method fn restore( id: &Self::Id, strategy: Strategy, ) -> Result<<Strategy as RestoreStrategy>::Success, DispatchError>; }
Expand description

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

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

A restore strategy defines restore parameters.

Required Methods§

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

Restore 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<Id, M, S, Op> Restore<S> for MapId<Id, <Op as AssetDefinition>::Id, M, Op>
where M: Convert<Id, Result<<Op as AssetDefinition>::Id, DispatchError>>, S: RestoreStrategy, Op: Restore<S>, <MapId<Id, <Op as AssetDefinition>::Id, M, Op> as AssetDefinition>::Id: Clone,

§

impl<O, E, S, Op> Restore<CheckOrigin<O, S>> for UseEnsuredOrigin<E, Op>
where E: EnsureOriginWithArg<O, S>, S: RestoreStrategy, Op: Restore<S>,

§

impl<StashAccount, UpdateOp> Restore<WithConfig<ConfigValue<Owner<<StashAccount as TypedGet>::Type>>>> for StashAccountAssetOps<StashAccount, UpdateOp>
where StashAccount: TypedGet, <StashAccount as TypedGet>::Type: 'static, UpdateOp: Update<CheckState<Owner<<StashAccount as TypedGet>::Type>, Owner<<StashAccount as TypedGet>::Type>>>,

§

impl<Strategy, RestoreOp, UpdateOp, StashOp> Restore<Strategy> for CombinedAssetOps<RestoreOp, UpdateOp, StashOp>
where Strategy: RestoreStrategy, RestoreOp: Restore<Strategy>, UpdateOp: AssetDefinition<Id = <RestoreOp as AssetDefinition>::Id>, StashOp: AssetDefinition<Id = <RestoreOp as AssetDefinition>::Id>,