Trait odra_core::module::ModuleComponent
source · 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.
Object Safety§
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.