pub unsafe trait AsReprMut: AsRepr {
// Provided methods
fn as_repr_mut(this: &mut Self) -> &mut Self::Repr { ... }
fn from_repr(repr: Self::Repr) -> Self { ... }
}Expand description
Type that is bi-directionally transmutable with a primitive representation.
§Safety
Selfmust be transmutable fromSelf::Repr.
Provided Methods§
Sourcefn as_repr_mut(this: &mut Self) -> &mut Self::Repr
fn as_repr_mut(this: &mut Self) -> &mut Self::Repr
Convert from &mut Self to &mut Self::Repr.
Sourcefn from_repr(repr: Self::Repr) -> Self
fn from_repr(repr: Self::Repr) -> Self
Convert from Self::Repr to Self.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".