pub trait ScriptDefault {
// Required method
fn script_default(origin: Origin) -> RuntimeResult<Cell>;
}
Expand description
A default constructor for a script object.
Implementing this trait enables the TypeMeta::instantiate operation.
The trait must be implemented for the registered type, and the implementation must be exported using the export macro. For more details, see the module documentation.
Required Methods§
Sourcefn script_default(origin: Origin) -> RuntimeResult<Cell>
fn script_default(origin: Origin) -> RuntimeResult<Cell>
Operation implementation.
The parameter and return type of this function correspond to those of the TypeMeta::instantiate 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.