pub struct WithExportsIndices { /* private fields */ }
runtime
and crate feature component-model
and docsrs
only.Expand description
Auto-generated bindings for index of the exports of
with-exports
.
This is an implementation detail of WithExportsPre
and can
be constructed if needed as well.
For more information see WithExports
as well.
Implementations§
source§impl WithExportsIndices
impl WithExportsIndices
sourcepub fn new(component: &Component) -> Result<Self>
pub fn new(component: &Component) -> Result<Self>
Creates a new copy of WithExportsIndices
bindings which can then
be used to instantiate into a particular store.
This method may fail if the component does not have the required exports.
sourcepub fn new_instance(
store: impl AsContextMut,
instance: &Instance,
) -> Result<Self>
pub fn new_instance( store: impl AsContextMut, instance: &Instance, ) -> Result<Self>
Creates a new instance of WithExportsIndices
from an
instantiated component.
This method of creating a WithExports
will perform string
lookups for all exports when this method is called. This
will only succeed if the provided instance matches the
requirements of WithExports
.
sourcepub fn load(
&self,
store: impl AsContextMut,
instance: &Instance,
) -> Result<WithExports>
pub fn load( &self, store: impl AsContextMut, instance: &Instance, ) -> Result<WithExports>
Uses the indices stored in self
to load an instance
of WithExports
from the instance provided.
Note that at this time this method will additionally perform type-checks of all exports.
Trait Implementations§
source§impl Clone for WithExportsIndices
impl Clone for WithExportsIndices
source§fn clone(&self) -> WithExportsIndices
fn clone(&self) -> WithExportsIndices
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl Freeze for WithExportsIndices
impl RefUnwindSafe for WithExportsIndices
impl Send for WithExportsIndices
impl Sync for WithExportsIndices
impl Unpin for WithExportsIndices
impl UnwindSafe for WithExportsIndices
Blanket Implementations§
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)