pub trait ModuleComponent {
// Required method
fn instance(env: Rc<ContractEnv>, index: u8) -> Self;
}Expand description
Represents a component that can be a part of a module.
Required Methods§
Sourcefn instance(env: Rc<ContractEnv>, index: u8) -> Self
fn instance(env: Rc<ContractEnv>, index: u8) -> Self
Creates a new instance of the module component.
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.
Implementors§
impl<K: ToBytes, V> ModuleComponent for Mapping<K, V>
impl<T> ModuleComponent for List<T>
impl<T> ModuleComponent for Var<T>
Implements the ModuleComponent trait for the Var struct.
impl<T: ContractRef> ModuleComponent for External<T>
impl<T: Num + One + Zero + Default + Copy + ToBytes + FromBytes + CLTyped> ModuleComponent for Sequence<T>
Implements the ModuleComponent trait for the Sequence struct.