pub trait Inspect<Strategy: InspectStrategy>: AssetDefinition {
// Required method
fn inspect(
id: &Self::Id,
strategy: Strategy,
) -> Result<Strategy::Value, DispatchError>;
}Expand description
A trait representing the ability of a certain asset to provide its state information.
This trait can be implemented multiple times using different
inspect strategies.
An inspect strategy defines how the asset state is identified/retrieved
and what Value type is returned.
Required Methods§
Sourcefn inspect(
id: &Self::Id,
strategy: Strategy,
) -> Result<Strategy::Value, DispatchError>
fn inspect( id: &Self::Id, strategy: Strategy, ) -> Result<Strategy::Value, DispatchError>
Inspect state information of the asset
using the given id and the inspect 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.