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§

source

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§

source§

impl<K: ToBytes, V> ModuleComponent for Mapping<K, V>

source§

impl<T> ModuleComponent for List<T>

source§

impl<T> ModuleComponent for Var<T>

Implements the ModuleComponent trait for the Var struct.

source§

impl<T: ContractRef> ModuleComponent for External<T>

source§

impl<T: Num + One + Zero + Default + Copy + ToBytes + FromBytes + CLTyped> ModuleComponent for Sequence<T>

Implements the ModuleComponent trait for the Sequence struct.

source§

impl<T: Module> ModuleComponent for SubModule<T>