#[repr(align(8))]pub struct Align8<T> {
pub inner: T,
}Expand description
A wrapper around an instance of T that is aligned on an eight byte boundary. This allows FlagPtr to steal the bottom three bits of pointers to instances of T without worrying about T’s alignment requirements.
TODO: Use Deref or something to make this transparently act like a T?
Fields§
§inner: TTrait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Align8<T>where
T: Freeze,
impl<T> RefUnwindSafe for Align8<T>where
T: RefUnwindSafe,
impl<T> Send for Align8<T>where
T: Send,
impl<T> Sync for Align8<T>where
T: Sync,
impl<T> Unpin for Align8<T>where
T: Unpin,
impl<T> UnwindSafe for Align8<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