pub struct ComponentInstance(/* private fields */);Available on crate feature
component-model only.Expand description
Component instance type
Implementations§
Source§impl ComponentInstance
impl ComponentInstance
Sourcepub fn get_export(&self, engine: &Engine, name: &str) -> Option<ComponentItem>
Available on crate feature runtime only.
pub fn get_export(&self, engine: &Engine, name: &str) -> Option<ComponentItem>
runtime only.Returns export associated with name, if such exists in the component instance
Sourcepub fn exports<'a>(
&'a self,
engine: &'a Engine,
) -> impl ExactSizeIterator<Item = (&str, ComponentItem)>
Available on crate feature runtime only.
pub fn exports<'a>( &'a self, engine: &'a Engine, ) -> impl ExactSizeIterator<Item = (&str, ComponentItem)>
runtime only.Iterates over exports of the component instance
Trait Implementations§
Source§impl Clone for ComponentInstance
Available on crate feature runtime only.
impl Clone for ComponentInstance
Available on crate feature
runtime only.Source§fn clone(&self) -> ComponentInstance
fn clone(&self) -> ComponentInstance
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for ComponentInstance
impl RefUnwindSafe for ComponentInstance
impl Send for ComponentInstance
impl Sync for ComponentInstance
impl Unpin for ComponentInstance
impl UnwindSafe for ComponentInstance
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 more