pub struct ReturnAs<T, U>(/* private fields */);
Expand description
Return T
through the FFI boundary by first converting it to U
on the host’s side, and then
converting it back to T
in the runtime.
Raw FFI type: same as U
’s FFI type
Trait Implementations§
Source§impl<T, U> IntoFFIValue for ReturnAs<T, U>
impl<T, U> IntoFFIValue for ReturnAs<T, U>
Source§fn into_ffi_value(
value: Self::Inner,
context: &mut dyn FunctionContext,
) -> Result<Self::FFIType>
fn into_ffi_value( value: Self::Inner, context: &mut dyn FunctionContext, ) -> Result<Self::FFIType>
Convert
Self::Inner
into an FFI value.Auto Trait Implementations§
impl<T, U> Freeze for ReturnAs<T, U>
impl<T, U> RefUnwindSafe for ReturnAs<T, U>where
T: RefUnwindSafe,
U: RefUnwindSafe,
impl<T, U> Send for ReturnAs<T, U>
impl<T, U> Sync for ReturnAs<T, U>
impl<T, U> Unpin for ReturnAs<T, U>
impl<T, U> UnwindSafe for ReturnAs<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