|
@@ -10,10 +10,12 @@ pub type COption<T> = ([u8; 4], T);
|
|
|
|
|
|
/// Marker trait for types that can be cast from a raw pointer.
|
|
|
///
|
|
|
+/// # Safety
|
|
|
+///
|
|
|
/// It is up to the type implementing this trait to guarantee that the cast is
|
|
|
/// safe, i.e., the fields of the type are well aligned and there are no padding
|
|
|
/// bytes.
|
|
|
-pub trait Transmutable {
|
|
|
+pub unsafe trait Transmutable {
|
|
|
/// The length of the type.
|
|
|
///
|
|
|
/// This must be equal to the size of each individual field in the type.
|