Struct wasmer_types::Import
source · [−]pub struct Import<S = String, 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<S: AsRef<str>, T> Import<S, T>
impl<S: AsRef<str>, T> Import<S, T>
sourcepub fn new(module: S, name: S, index: u32, ty: T) -> Self
pub fn new(module: S, name: S, index: u32, 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
impl<S: Eq, T: Eq> Eq for Import<S, T>
impl<S, T> StructuralEq for Import<S, T>
impl<S, T> StructuralPartialEq for Import<S, T>
Auto Trait Implementations
impl<S, T> RefUnwindSafe for Import<S, T> where
S: RefUnwindSafe,
T: RefUnwindSafe,
impl<S, T> Send for Import<S, T> where
S: Send,
T: Send,
impl<S, T> Sync for Import<S, T> where
S: Sync,
T: Sync,
impl<S, T> Unpin for Import<S, T> where
S: Unpin,
T: Unpin,
impl<S, T> UnwindSafe for Import<S, T> where
S: UnwindSafe,
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.
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more