pub trait Create<Strategy: CreateStrategy> {
// Required method
fn create(strategy: Strategy) -> Result<Strategy::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§
Sourcefn create(strategy: Strategy) -> Result<Strategy::Success, DispatchError>
fn create(strategy: Strategy) -> Result<Strategy::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.