Trait wasmer::LikeNamespace
source · [−]pub trait LikeNamespace {
fn get_namespace_export(&self, name: &str) -> Option<Export>;
fn get_namespace_exports(&self) -> Vec<(String, Export)>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
;
fn as_exports(&self) -> Option<Exports> { ... }
}
Expand description
The LikeNamespace
trait represents objects that act as a namespace for imports.
For example, an Instance
or Namespace
could be
considered namespaces that could provide imports to an instance.
Required methods
fn get_namespace_export(&self, name: &str) -> Option<Export>
fn get_namespace_export(&self, name: &str) -> Option<Export>
Gets an export by name.
Provided methods
fn as_exports(&self) -> Option<Exports>
fn as_exports(&self) -> Option<Exports>
Returns the contents of this namespace as an Exports
.
This is used by ImportObject::get_namespace_exports
.