Trait Create
pub trait Create<Strategy>where
Strategy: CreateStrategy,{
// Required method
fn create(
strategy: Strategy,
) -> Result<<Strategy as CreateStrategy>::Success, DispatchError>;
}
Expand description
A trait representing the ability of a certain asset to be created.
This trait can be implemented multiple times using different
"create" strategies
.
A create strategy defines all aspects of asset creation including how an asset ID is assigned.
Required Methods§
fn create(
strategy: Strategy,
) -> Result<<Strategy as CreateStrategy>::Success, DispatchError>
fn create( strategy: Strategy, ) -> Result<<Strategy as CreateStrategy>::Success, DispatchError>
Create a new asset using the provided strategy
.
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.