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§
Sourcetype UpdateValue<'a>
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
ValueisVec<u8>, theUpdateValuecan beOption<&'a [u8]>(e.g., asset attributes that can be modified or deleted). - If the
Valueisbool, theUpdateValuecan also bebool.
Sourcetype Success
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.