Struct aligned_vec::ABox
source · [−]pub struct ABox<T: ?Sized, A: Alignment = ConstAlign<CACHELINE_ALIGN>> { /* private fields */ }
Expand description
Aligned box. See Box
for more info.
Implementations
sourceimpl<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(self) -> (*mut T, usize)
pub fn into_raw_parts(self) -> (*mut T, usize)
Decomposes a ABox<T>
into its raw parts: (ptr, alignment)
.
Trait Implementations
sourceimpl<'de, T: Deserialize<'de>, const N: usize> Deserialize<'de> for ABox<[T], ConstAlign<N>>
Available on crate feature serde
only.
impl<'de, T: Deserialize<'de>, const N: usize> Deserialize<'de> for ABox<[T], ConstAlign<N>>
serde
only.sourcefn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl<'de, T: Deserialize<'de>, const N: usize> Deserialize<'de> for ABox<T, ConstAlign<N>>
Available on crate feature serde
only.
impl<'de, T: Deserialize<'de>, const N: usize> Deserialize<'de> for ABox<T, ConstAlign<N>>
serde
only.sourcefn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl<T: Ord + ?Sized, A: Alignment> Ord for ABox<T, A>
impl<T: Ord + ?Sized, A: Alignment> Ord for ABox<T, A>
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl<T: PartialEq + ?Sized, A: Alignment> PartialEq<ABox<T, A>> for ABox<T, A>
impl<T: PartialEq + ?Sized, A: Alignment> PartialEq<ABox<T, A>> for ABox<T, A>
sourceimpl<T: PartialOrd + ?Sized, A: Alignment> PartialOrd<ABox<T, A>> for ABox<T, A>
impl<T: PartialOrd + ?Sized, A: Alignment> PartialOrd<ABox<T, A>> for ABox<T, A>
sourcefn partial_cmp(&self, other: &Self) -> Option<Ordering>
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl<T: ?Sized + Serialize, A: Alignment> Serialize for ABox<T, A>
Available on crate feature serde
only.
impl<T: ?Sized + Serialize, A: Alignment> Serialize for ABox<T, A>
serde
only.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: ?Sized, A> RefUnwindSafe for ABox<T, A> where
A: RefUnwindSafe,
T: RefUnwindSafe,
impl<T: ?Sized, A> Unpin for ABox<T, A> where
A: Unpin,
T: Unpin,
impl<T: ?Sized, A> UnwindSafe for ABox<T, A> where
A: UnwindSafe,
T: UnwindSafe + RefUnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more