Struct wasmer::ImportType
source · pub struct ImportType<T = ExternType> { /* private fields */ }
Expand description
A descriptor for an imported value into a wasm module.
This type is primarily accessed from the Module::imports
API. Each ImportType
describes an import into the wasm module
with the module/name that it’s imported from as well as the type
of item that’s being imported.
Implementations§
source§impl<T> ImportType<T>
impl<T> ImportType<T>
sourcepub fn new(module: &str, name: &str, ty: T) -> ImportType<T>
pub fn new(module: &str, name: &str, ty: T) -> ImportType<T>
Creates a new import descriptor which comes from module
and name
and
is of type ty
.
sourcepub fn module(&self) -> &str
pub fn module(&self) -> &str
Returns the module name that this import is expected to come from.
Trait Implementations§
source§impl<T> Clone for ImportType<T>where
T: Clone,
impl<T> Clone for ImportType<T>where
T: Clone,
source§fn clone(&self) -> ImportType<T>
fn clone(&self) -> ImportType<T>
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<T> Debug for ImportType<T>where
T: Debug,
impl<T> Debug for ImportType<T>where
T: Debug,
source§impl<T> Hash for ImportType<T>where
T: Hash,
impl<T> Hash for ImportType<T>where
T: Hash,
source§impl<T> PartialEq for ImportType<T>where
T: PartialEq,
impl<T> PartialEq for ImportType<T>where
T: PartialEq,
source§fn eq(&self, other: &ImportType<T>) -> bool
fn eq(&self, other: &ImportType<T>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<T> Eq for ImportType<T>where
T: Eq,
impl<T> StructuralPartialEq for ImportType<T>
Auto Trait Implementations§
impl<T> Freeze for ImportType<T>where
T: Freeze,
impl<T> RefUnwindSafe for ImportType<T>where
T: RefUnwindSafe,
impl<T> Send for ImportType<T>where
T: Send,
impl<T> Sync for ImportType<T>where
T: Sync,
impl<T> Unpin for ImportType<T>where
T: Unpin,
impl<T> UnwindSafe for ImportType<T>where
T: UnwindSafe,
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> CallHasher for T
impl<T> CallHasher for T
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.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