Struct rkyv::util::Aligned [−][src]
#[repr(align(16))]pub struct Aligned<T>(pub T);
Wraps a type and aligns it to 16 bytes.
Examples
use core::mem; use rkyv::Aligned; assert_eq!(mem::align_of::<u8>(), 1); assert_eq!(mem::align_of::<Aligned<u8>>(), 16);
Trait Implementations
impl<T: Copy> Copy for Aligned<T>
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for Aligned<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for Aligned<T> where
T: Send,
T: Send,
impl<T> Sync for Aligned<T> where
T: Sync,
T: Sync,
impl<T> Unpin for Aligned<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for Aligned<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> ArchivePointee for T
[src]
impl<T> ArchivePointee for T
[src]type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
pub fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
[src]
pub fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
[src]Converts some archived metadata to the pointer metadata for itself.
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more