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
Value
isVec<u8>
, theUpdateValue
can beOption<&'a [u8]>
(e.g., asset attributes that can be modified or deleted). - If the
Value
isbool
, theUpdateValue
can 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.