Struct rkyv::util::AlignedBytes
source · [−]Expand description
A buffer of bytes aligned to 16 bytes.
Examples
use core::mem;
use rkyv::AlignedBytes;
assert_eq!(mem::align_of::<u8>(), 1);
assert_eq!(mem::align_of::<AlignedBytes<256>>(), 16);
Tuple Fields
0: [u8; N]
Trait Implementations
sourceimpl<const N: usize> Clone for AlignedBytes<N>
impl<const N: usize> Clone for AlignedBytes<N>
sourcefn clone(&self) -> AlignedBytes<N>
fn clone(&self) -> AlignedBytes<N>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<const N: usize> Debug for AlignedBytes<N>
impl<const N: usize> Debug for AlignedBytes<N>
sourceimpl<const N: usize> Default for AlignedBytes<N>
impl<const N: usize> Default for AlignedBytes<N>
sourceimpl<const N: usize> Deref for AlignedBytes<N>
impl<const N: usize> Deref for AlignedBytes<N>
sourceimpl<const N: usize> DerefMut for AlignedBytes<N>
impl<const N: usize> DerefMut for AlignedBytes<N>
impl<const N: usize> Copy for AlignedBytes<N>
Auto Trait Implementations
impl<const N: usize> RefUnwindSafe for AlignedBytes<N>
impl<const N: usize> Send for AlignedBytes<N>
impl<const N: usize> Sync for AlignedBytes<N>
impl<const N: usize> Unpin for AlignedBytes<N>
impl<const N: usize> UnwindSafe for AlignedBytes<N>
Blanket Implementations
sourceimpl<T> ArchivePointee for T
impl<T> ArchivePointee for T
type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
sourcefn pointer_metadata(_: &Self::ArchivedMetadata) -> <Self as Pointee>::Metadata
fn pointer_metadata(_: &Self::ArchivedMetadata) -> <Self as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<F, W, T, D> Deserialize<With<T, W>, D> for F where
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
impl<F, W, T, D> Deserialize<With<T, W>, D> for F where
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more