pub struct PassAs<T, U>(/* private fields */);
Expand description
Pass T
through the FFI boundary by first converting it to U
in the runtime, and then
converting it back to T
on the host’s side.
Raw FFI type: same as U
’s FFI type
Trait Implementations§
Source§impl<'a, T, U> FromFFIValue<'a> for PassAs<T, U>
impl<'a, T, U> FromFFIValue<'a> for PassAs<T, U>
Source§fn from_ffi_value(
context: &mut dyn FunctionContext,
arg: Self::FFIType,
) -> Result<Self::Owned>
fn from_ffi_value( context: &mut dyn FunctionContext, arg: Self::FFIType, ) -> Result<Self::Owned>
Creates
Self::Owned
from the given arg
received through the FFI boundary from the
runtime.Source§fn take_from_owned(owned: &'a mut Self::Owned) -> Self::Inner
fn take_from_owned(owned: &'a mut Self::Owned) -> Self::Inner
Creates
Self::Inner
from an owned value.Source§fn write_back_into_runtime(
_value: Self::Owned,
_context: &mut dyn FunctionContext,
_arg: Self::FFIType,
) -> Result<()>
fn write_back_into_runtime( _value: Self::Owned, _context: &mut dyn FunctionContext, _arg: Self::FFIType, ) -> Result<()>
Write back a modified
value
back into the runtime’s memory. Read moreAuto Trait Implementations§
impl<T, U> Freeze for PassAs<T, U>
impl<T, U> RefUnwindSafe for PassAs<T, U>where
T: RefUnwindSafe,
U: RefUnwindSafe,
impl<T, U> Send for PassAs<T, U>
impl<T, U> Sync for PassAs<T, U>
impl<T, U> Unpin for PassAs<T, U>
impl<T, U> UnwindSafe for PassAs<T, U>where
T: UnwindSafe,
U: 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