Struct linera_wasmer::Engine
source · pub struct Engine(/* private fields */);
Expand description
The engine type
Implementations§
source§impl Engine
impl Engine
sourcepub fn deterministic_id(&self) -> &str
pub fn deterministic_id(&self) -> &str
Returns the deterministic id of this engine
sourcepub unsafe fn deserialize_unchecked(
&self,
bytes: impl IntoBytes,
) -> Result<Arc<Artifact>, DeserializeError>
pub unsafe fn deserialize_unchecked( &self, bytes: impl IntoBytes, ) -> Result<Arc<Artifact>, DeserializeError>
Deserializes a WebAssembly module which was previously serialized with
Module::serialize
.
NOTE: you should almost always prefer Self::deserialize
.
§Safety
sourcepub unsafe fn deserialize(
&self,
bytes: impl IntoBytes,
) -> Result<Arc<Artifact>, DeserializeError>
pub unsafe fn deserialize( &self, bytes: impl IntoBytes, ) -> Result<Arc<Artifact>, DeserializeError>
Deserializes a WebAssembly module which was previously serialized with
Module::serialize
.
§Safety
sourcepub unsafe fn deserialize_from_file_unchecked(
&self,
file_ref: &Path,
) -> Result<Arc<Artifact>, DeserializeError>
pub unsafe fn deserialize_from_file_unchecked( &self, file_ref: &Path, ) -> Result<Arc<Artifact>, DeserializeError>
Load a serialized WebAssembly module from a file and deserialize it.
NOTE: you should almost always prefer Self::deserialize_from_file
.
§Safety
sourcepub unsafe fn deserialize_from_file(
&self,
file_ref: &Path,
) -> Result<Arc<Artifact>, DeserializeError>
pub unsafe fn deserialize_from_file( &self, file_ref: &Path, ) -> Result<Arc<Artifact>, DeserializeError>
Load a serialized WebAssembly module from a file and deserialize it.
§Safety
Trait Implementations§
source§impl AsEngineRef for Engine
impl AsEngineRef for Engine
source§fn as_engine_ref(&self) -> EngineRef<'_>
fn as_engine_ref(&self) -> EngineRef<'_>
Returns a
EngineRef
pointing to the underlying context.source§impl NativeEngineExt for Engine
impl NativeEngineExt for Engine
source§fn new(
compiler_config: Box<dyn CompilerConfig>,
target: Target,
features: Features,
) -> Self
fn new( compiler_config: Box<dyn CompilerConfig>, target: Target, features: Features, ) -> Self
Create a new
Engine
with the given configsource§fn set_tunables(&mut self, tunables: impl Tunables + Send + Sync + 'static)
fn set_tunables(&mut self, tunables: impl Tunables + Send + Sync + 'static)
Attach a Tunable to this engine
source§unsafe fn deserialize_from_mmapped_file_unchecked(
&self,
file_ref: &Path,
) -> Result<Module, DeserializeError>
unsafe fn deserialize_from_mmapped_file_unchecked( &self, file_ref: &Path, ) -> Result<Module, DeserializeError>
Load a serialized WebAssembly module from a memory mapped file and deserialize it. Read more
source§unsafe fn deserialize_from_mmapped_file(
&self,
file_ref: &Path,
) -> Result<Module, DeserializeError>
unsafe fn deserialize_from_mmapped_file( &self, file_ref: &Path, ) -> Result<Module, DeserializeError>
Load a serialized WebAssembly module from a memory mapped file and deserialize it. Read more
source§fn set_hash_algorithm(&mut self, hash_algorithm: Option<HashAlgorithm>)
fn set_hash_algorithm(&mut self, hash_algorithm: Option<HashAlgorithm>)
Sets the hash algorithm
Auto Trait Implementations§
impl Freeze for Engine
impl !RefUnwindSafe for Engine
impl Send for Engine
impl Sync for Engine
impl Unpin for Engine
impl !UnwindSafe for Engine
Blanket Implementations§
source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
source§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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
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>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.
source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T> Upcastable for T
impl<T> Upcastable for T
source§fn upcast_any_ref(&self) -> &(dyn Any + 'static)
fn upcast_any_ref(&self) -> &(dyn Any + 'static)
upcast ref
source§fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
upcast mut ref