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:
- Repr C & packed alignment (no reordering, no padding).
- Copy, Sized, and no pointers.
- No floats (non-determinism).
§Safety
Incorrectly implementing this could lead to undefined behavior in types passed between wasm and rust.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.