Trait fvm_shared::sys::SyscallSafe

source ·
pub unsafe trait SyscallSafe: Copy + Sized + 'static { }
Expand description

An unsafe trait to mark “syscall safe” types. These types must be safe to memcpy to and from WASM. This means:

  1. Repr C & packed alignment (no reordering, no padding).
  2. Copy, Sized, and no pointers.
  3. No floats (non-determinism).

§Safety

Incorrectly implementing this could lead to undefined behavior in types passed between wasm and rust.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl SyscallSafe for i8

source§

impl SyscallSafe for i16

source§

impl SyscallSafe for i32

source§

impl SyscallSafe for i64

source§

impl SyscallSafe for u8

source§

impl SyscallSafe for u16

source§

impl SyscallSafe for u32

source§

impl SyscallSafe for u64

source§

impl SyscallSafe for ()

source§

impl<T, const N: usize> SyscallSafe for [T; N]
where T: SyscallSafe,

Implementors§