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

Trait UpdateStrategy

Source
pub trait UpdateStrategy {
    type UpdateValue<'a>;
    type Success;
}
Expand description

A strategy for use in the Update implementations.

The common update strategies are:

Required Associated Types§

Source

type UpdateValue<'a>

The value to update the asset’s state. Usually, it should be related to the corresponding InspectStrategy::Value.

For instance:

  • If the Value is Vec<u8>, the UpdateValue can be Option<&'a [u8]> (e.g., asset attributes that can be modified or deleted).
  • If the Value is bool, the UpdateValue can also be bool.
Source

type Success

This type represents a successful asset state update. It will be in the Result type of the Update::update function.

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§

Source§

impl<AccountId: 'static> UpdateStrategy for Admin<AccountId>

Source§

impl<AccountId: 'static> UpdateStrategy for Owner<AccountId>

Source§

impl<Condition> UpdateStrategy for CanCreate<Condition>

Source§

impl<Condition> UpdateStrategy for CanDestroy<Condition>

Source§

impl<Flavor> UpdateStrategy for CanUpdate<Flavor>

Source§

impl<Inspect: InspectStrategy, Inner: UpdateStrategy> UpdateStrategy for CheckState<Inspect, Inner>

Source§

impl<Request> UpdateStrategy for Bytes<Request>

Source§

impl<RuntimeOrigin, Inner: UpdateStrategy> UpdateStrategy for CheckOrigin<RuntimeOrigin, Inner>