pub enum WasmContractModule {
Wasmer {
engine: Engine,
module: Module,
},
}Expand description
A user contract in a compiled WebAssembly module.
Variants§
Implementations§
source§impl WasmContractModule
impl WasmContractModule
sourcepub async fn from_wasmer(
contract_bytecode: Bytecode
) -> Result<Self, WasmExecutionError>
pub async fn from_wasmer( contract_bytecode: Bytecode ) -> Result<Self, WasmExecutionError>
Creates a new WasmContractModule using Wasmer with the provided bytecodes.
source§impl WasmContractModule
impl WasmContractModule
sourcepub async fn new(
contract_bytecode: Bytecode,
runtime: WasmRuntime
) -> Result<Self, WasmExecutionError>
pub async fn new( contract_bytecode: Bytecode, runtime: WasmRuntime ) -> Result<Self, WasmExecutionError>
Creates a new WasmContractModule using the WebAssembly module with the provided bytecodes.
sourcepub async fn from_file(
contract_bytecode_file: impl AsRef<Path>,
runtime: WasmRuntime
) -> Result<Self, WasmExecutionError>
pub async fn from_file( contract_bytecode_file: impl AsRef<Path>, runtime: WasmRuntime ) -> Result<Self, WasmExecutionError>
Creates a new WasmContractModule using the WebAssembly module in bytecode_file.
Trait Implementations§
source§impl Clone for WasmContractModule
impl Clone for WasmContractModule
source§fn clone(&self) -> WasmContractModule
fn clone(&self) -> WasmContractModule
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl UserContractModule for WasmContractModule
impl UserContractModule for WasmContractModule
fn instantiate( &self, runtime: ContractSyncRuntime ) -> Result<UserContractInstance, ExecutionError>
Auto Trait Implementations§
impl !RefUnwindSafe for WasmContractModule
impl Send for WasmContractModule
impl Sync for WasmContractModule
impl Unpin for WasmContractModule
impl !UnwindSafe for WasmContractModule
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
§fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize( &self, deserializer: &mut D ) -> Result<With<T, W>, <D as Fallible>::Error>
Deserializes using the given deserializer
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> Upcastable for T
impl<T> Upcastable for T
§fn upcast_any_ref(&self) -> &(dyn Any + 'static)
fn upcast_any_ref(&self) -> &(dyn Any + 'static)
upcast ref
§fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
upcast mut ref
§fn upcast_any_box(self: Box<T>) -> Box<dyn Any>
fn upcast_any_box(self: Box<T>) -> Box<dyn Any>
upcast boxed dyn