pub struct FlagPtr<T> { /* private fields */ }Expand description
A packed pointer type that steals some bits to make room for a 3-bit flag
T must be aligned to 8 bytes:
struct MyStruct { }If you don’t control the alignment requirements of T, consider using the
wrapper Align8<T> in this module instead:
struct MaybeUnaligned { b: bool }
let ptr : FlagPtr<Align8<MaybeUnaligned>> = Default::default();Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for FlagPtr<T>
impl<T> RefUnwindSafe for FlagPtr<T>where
T: RefUnwindSafe,
impl<T> Send for FlagPtr<T>where
T: Send,
impl<T> Sync for FlagPtr<T>where
T: Sync,
impl<T> Unpin for FlagPtr<T>where
T: Unpin,
impl<T> UnwindSafe for FlagPtr<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