Trait Portable
pub unsafe trait Portable { }
Available on crate feature
dep_rkyv
only.Expand description
A type with a stable, well-defined layout that is the same on all targets.
§Safety
The implementing type must have a stable, well-defined layout that is the
same on all targets. Structs and unions must be #[repr(transparent)]
or
#[repr(C)]
. Enums must be #[repr(C)]
, #[repr(int)]
, or #[repr(C, int)]
.
The implementing type must not have interior mutability (i.e. no
UnsafeCell
s).
Implementations on Foreign Types§
impl Portable for bool
impl Portable for i8
impl Portable for str
impl Portable for u8
impl Portable for ()
impl<T> Portable for [T]where
T: Portable,
impl<T, const N: usize> Portable for [T; N]where
T: Portable,
Implementors§
impl Portable for ArchivedIpAddr
impl Portable for ArchivedSocketAddr
impl Portable for ArchivedBoxed
Available on crate feature
alloc
only.