Struct wasm_bindgen::convert::WasmRet
source · #[repr(C)]pub struct WasmRet<T: WasmAbi> { /* private fields */ }
Expand description
A repr(C) struct containing all of the primitives of a WasmAbi
type, in
order.
This is used as the return type of imported/exported functions. WasmAbi
types aren’t guaranteed to be FFI-safe, so we can’t return them directly:
instead we return this.
If all but one of the primitives is ()
, this corresponds to returning the
remaining primitive directly, otherwise a return pointer is used.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<T> RefUnwindSafe for WasmRet<T>where
<T as WasmAbi>::Prim1: RefUnwindSafe,
<T as WasmAbi>::Prim2: RefUnwindSafe,
<T as WasmAbi>::Prim3: RefUnwindSafe,
<T as WasmAbi>::Prim4: RefUnwindSafe,
impl<T> Send for WasmRet<T>
impl<T> Sync for WasmRet<T>
impl<T> Unpin for WasmRet<T>
impl<T> UnwindSafe for WasmRet<T>where
<T as WasmAbi>::Prim1: UnwindSafe,
<T as WasmAbi>::Prim2: UnwindSafe,
<T as WasmAbi>::Prim3: UnwindSafe,
<T as WasmAbi>::Prim4: 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