pub struct ABox<T: ?Sized, A: Alignment = ConstAlign<CACHELINE_ALIGN>> { /* private fields */ }
Expand description
Aligned box. See Box
for more info.
Note: passing an alignment value of 0
or a power of two that is less than the minimum alignment will cause the vector to use the minimum valid alignment for the type T
and alignment type A
.
Implementations§
Source§impl<T: ?Sized, A: Alignment> ABox<T, A>
impl<T: ?Sized, A: Alignment> ABox<T, A>
Sourcepub unsafe fn from_raw_parts(align: usize, ptr: *mut T) -> Self
pub unsafe fn from_raw_parts(align: usize, ptr: *mut T) -> Self
Creates a new ABox<T>
from its raw parts.
§Safety
The arguments to this function must be acquired from a previous call to
Self::into_raw_parts
.
Sourcepub fn into_raw_parts(this: Self) -> (*mut T, usize)
pub fn into_raw_parts(this: Self) -> (*mut T, usize)
Decomposes a ABox<T>
into its raw parts: (ptr, alignment)
.
Trait Implementations§
Source§impl<T: Ord + ?Sized, A: Alignment> Ord for ABox<T, A>
impl<T: Ord + ?Sized, A: Alignment> Ord for ABox<T, A>
Source§impl<T: PartialOrd + ?Sized, A: Alignment> PartialOrd for ABox<T, A>
impl<T: PartialOrd + ?Sized, A: Alignment> PartialOrd for ABox<T, A>
impl<T: Eq + ?Sized, A: Alignment> Eq for ABox<T, A>
impl<T: ?Sized + Send, A: Alignment + Send> Send for ABox<T, A>
impl<T: ?Sized + Sync, A: Alignment + Sync> Sync for ABox<T, A>
Auto Trait Implementations§
impl<T, A> Freeze for ABox<T, A>
impl<T, A> RefUnwindSafe for ABox<T, A>
impl<T, A> Unpin for ABox<T, A>
impl<T, A> UnwindSafe for ABox<T, A>
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