#[repr(C, align(4))]pub struct Align4<T>(pub T);
Expand description
Wraps a value to be aligned to a minimum of 4.
If the size of the value held is already a multiple of 4 then this will be the same size as the wrapped value. Otherwise the compiler will add sufficient padding bytes on the end to make the size a multiple of 4.
Tuple Fields§
§0: T
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Align4<T>where
T: Freeze,
impl<T> RefUnwindSafe for Align4<T>where
T: RefUnwindSafe,
impl<T> Send for Align4<T>where
T: Send,
impl<T> Sync for Align4<T>where
T: Sync,
impl<T> Unpin for Align4<T>where
T: Unpin,
impl<T> UnwindSafe for Align4<T>where
T: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more