pub struct AsyncGuestCall<'c, D: Send + 'static, C> { /* private fields */ }
Expand description
A guest call to a WASM component function, which may be executed asynchronously.
It’s expected that the call_async
method will be called to execute the function call in all
cases, unless an error occurs during the setup of the call.
Implementations§
Source§impl<'c, D: Send, C> AsyncGuestCall<'c, D, C>
impl<'c, D: Send, C> AsyncGuestCall<'c, D, C>
Sourcepub async fn call_async(self) -> Result<AsyncGuestResult<'c, D, C>, Error>
pub async fn call_async(self) -> Result<AsyncGuestResult<'c, D, C>, Error>
Calls the underlying WASM component function with the provided arguments and results.
Returns an error if the function call fails, or an AsyncGuestResult
containing the results
of the call.
Methods from Deref<Target = GuestCallData<'c, D, C>>§
Sourcepub fn store(&self) -> StoreContext<'_, D>
pub fn store(&self) -> StoreContext<'_, D>
Returns the WASM runtime store context.
Sourcepub fn store_mut(&mut self) -> StoreContextMut<'_, D>
pub fn store_mut(&mut self) -> StoreContextMut<'_, D>
Returns a mutable reference to the WASM runtime store context.
Sourcepub fn interface(&self) -> &ForeignInterfacePath
pub fn interface(&self) -> &ForeignInterfacePath
Returns the fully-qualified WIT foreign interface path of the function being called.
Trait Implementations§
Source§impl<'c, D: Send, C> Deref for AsyncGuestCall<'c, D, C>
impl<'c, D: Send, C> Deref for AsyncGuestCall<'c, D, C>
Auto Trait Implementations§
impl<'c, D, C> Freeze for AsyncGuestCall<'c, D, C>
impl<'c, D, C> !RefUnwindSafe for AsyncGuestCall<'c, D, C>
impl<'c, D, C> Send for AsyncGuestCall<'c, D, C>where
C: Sync,
impl<'c, D, C> Sync for AsyncGuestCall<'c, D, C>
impl<'c, D, C> Unpin for AsyncGuestCall<'c, D, C>
impl<'c, D, C> !UnwindSafe for AsyncGuestCall<'c, D, C>
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> 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