Struct wasmer_types::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
sourceimpl<T> ImportType<T>
impl<T> ImportType<T>
sourcepub fn new(module: &str, name: &str, ty: T) -> Self
pub fn new(module: &str, name: &str, ty: T) -> Self
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
sourceimpl<T: Clone> Clone for ImportType<T>
impl<T: Clone> Clone for ImportType<T>
sourcefn clone(&self) -> ImportType<T>
fn clone(&self) -> ImportType<T>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<T: Debug> Debug for ImportType<T>
impl<T: Debug> Debug for ImportType<T>
sourceimpl<'de, T> Deserialize<'de> for ImportType<T> where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for ImportType<T> where
T: Deserialize<'de>,
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl<T: Hash> Hash for ImportType<T>
impl<T: Hash> Hash for ImportType<T>
sourceimpl<T: PartialEq> PartialEq<ImportType<T>> for ImportType<T>
impl<T: PartialEq> PartialEq<ImportType<T>> for ImportType<T>
sourcefn 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 ==
. Read more
sourcefn ne(&self, other: &ImportType<T>) -> bool
fn ne(&self, other: &ImportType<T>) -> bool
This method tests for !=
.
sourceimpl<T> Serialize for ImportType<T> where
T: Serialize,
impl<T> Serialize for ImportType<T> where
T: Serialize,
impl<T: Eq> Eq for ImportType<T>
impl<T> StructuralEq for ImportType<T>
impl<T> StructuralPartialEq for ImportType<T>
Auto Trait Implementations
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
sourceimpl<T> ArchivePointee for T
impl<T> ArchivePointee for T
type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
sourcefn 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.
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<F, W, T, D> Deserialize<With<T, W>, D> for F where
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
impl<F, W, T, D> Deserialize<With<T, W>, D> for F where
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.