Struct rkyv::util::AlignedBytes[][src]

#[repr(C, align(16))]
pub struct AlignedBytes<const N: usize>(pub [u8; N]);
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);

Trait Implementations

Performs the conversion.

Performs the conversion.

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Returns the “default value” for a type. Read more

The resulting type after dereferencing.

Dereferences the value.

Mutably dereferences the value.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

The archived version of the pointer metadata for this type.

Converts some archived metadata to the pointer metadata for itself.

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Deserializes using the given deserializer

Performs the conversion.

Performs the conversion.

Gets the layout of the type.

The type for metadata in pointers and references to Self.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.