pub struct InterfaceTrampoline<T, C> { /* private fields */ }
Expand description
A trampoline that allows for calling a specific interface function with a context.
Implementations§
Source§impl<T, C> InterfaceTrampoline<T, C>
impl<T, C> InterfaceTrampoline<T, C>
Sourcepub fn bounce<'c, D: 'static>(
&'c self,
function: &'c Func,
store: StoreContextMut<'c, D>,
path: &'c ForeignInterfacePath,
method: &'c str,
ty: &'c FuncType,
arguments: &'c [Val],
results: &'c mut [Val],
) -> Result<GuestResult<'c, D, C>, Error>where
T: Trampoline<D, C>,
pub fn bounce<'c, D: 'static>(
&'c self,
function: &'c Func,
store: StoreContextMut<'c, D>,
path: &'c ForeignInterfacePath,
method: &'c str,
ty: &'c FuncType,
arguments: &'c [Val],
results: &'c mut [Val],
) -> Result<GuestResult<'c, D, C>, Error>where
T: Trampoline<D, C>,
Runs the specified function with the given arguments and results, using the trampoline for execution interception.
Sourcepub async fn bounce_async<'c, D>(
&'c self,
function: &'c Func,
store: StoreContextMut<'c, D>,
path: &'c ForeignInterfacePath,
method: &'c str,
ty: &'c FuncType,
arguments: &'c [Val],
results: &'c mut [Val],
) -> Result<AsyncGuestResult<'c, D, C>, Error>
pub async fn bounce_async<'c, D>( &'c self, function: &'c Func, store: StoreContextMut<'c, D>, path: &'c ForeignInterfacePath, method: &'c str, ty: &'c FuncType, arguments: &'c [Val], results: &'c mut [Val], ) -> Result<AsyncGuestResult<'c, D, C>, Error>
Like bounce
, but for asynchronous function calls.
Trait Implementations§
Source§impl<T: Clone, C: Clone> Clone for InterfaceTrampoline<T, C>
impl<T: Clone, C: Clone> Clone for InterfaceTrampoline<T, C>
Source§fn clone(&self) -> InterfaceTrampoline<T, C>
fn clone(&self) -> InterfaceTrampoline<T, C>
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<T, C> Freeze for InterfaceTrampoline<T, C>
impl<T, C> RefUnwindSafe for InterfaceTrampoline<T, C>where
T: RefUnwindSafe,
C: RefUnwindSafe,
impl<T, C> Send for InterfaceTrampoline<T, C>
impl<T, C> Sync for InterfaceTrampoline<T, C>
impl<T, C> Unpin for InterfaceTrampoline<T, C>
impl<T, C> UnwindSafe for InterfaceTrampoline<T, C>where
T: UnwindSafe,
C: UnwindSafe,
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