pub struct ZeroArray<T, const N: usize, const ALIGN: usize, E: Endian = NativeEndian> { /* private fields */ }Available on (crate features
alloc or std or derive or serde or zero-copy or static-size) and crate feature zero-copy only.Expand description
A zero-copy array collection equivalent to [T; N].
Implementations§
Trait Implementations§
Source§impl<'a, T: ZeroCopy, const N: usize, const ALIGN: usize, E: Endian> Arbitrary<'a> for ZeroArray<T, N, ALIGN, E>
Available on crate feature fuzzing only.
impl<'a, T: ZeroCopy, const N: usize, const ALIGN: usize, E: Endian> Arbitrary<'a> for ZeroArray<T, N, ALIGN, E>
Available on crate feature
fuzzing only.Source§fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self>
Generate an arbitrary value of
Self from the given unstructured data. Read moreSource§fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
Generate an arbitrary value of
Self from the entirety of the given
unstructured data. Read moreSource§fn size_hint(depth: usize) -> (usize, Option<usize>)
fn size_hint(depth: usize) -> (usize, Option<usize>)
Get a size hint for how many bytes out of an
Unstructured this type
needs to construct itself. Read moreSource§fn try_size_hint(
depth: usize,
) -> Result<(usize, Option<usize>), MaxRecursionReached>
fn try_size_hint( depth: usize, ) -> Result<(usize, Option<usize>), MaxRecursionReached>
Get a size hint for how many bytes out of an
Unstructured this type
needs to construct itself. Read moreSource§impl<T: Clone, const N: usize, const ALIGN: usize, E: Clone + Endian> Clone for ZeroArray<T, N, ALIGN, E>
impl<T: Clone, const N: usize, const ALIGN: usize, E: Clone + Endian> Clone for ZeroArray<T, N, ALIGN, E>
Source§impl<T: Debug, const N: usize, const ALIGN: usize, E: Debug + Endian> Debug for ZeroArray<T, N, ALIGN, E>
impl<T: Debug, const N: usize, const ALIGN: usize, E: Debug + Endian> Debug for ZeroArray<T, N, ALIGN, E>
Source§impl<T: ZeroCopy + DeepValidator, const N: usize, const ALIGN: usize, E: Endian> DeepValidator for ZeroArray<T, N, ALIGN, E>
impl<T: ZeroCopy + DeepValidator, const N: usize, const ALIGN: usize, E: Endian> DeepValidator for ZeroArray<T, N, ALIGN, E>
Source§fn is_valid_deep(&self, buffer: &[u8]) -> bool
fn is_valid_deep(&self, buffer: &[u8]) -> bool
Performs a deep validation check on the relative pointer.
Source§impl<T: PartialEq, const N: usize, const ALIGN: usize, E: PartialEq + Endian> PartialEq for ZeroArray<T, N, ALIGN, E>
impl<T: PartialEq, const N: usize, const ALIGN: usize, E: PartialEq + Endian> PartialEq for ZeroArray<T, N, ALIGN, E>
Source§impl<T, const N: usize, const ALIGN: usize, E: Endian> StaticSize for ZeroArray<T, N, ALIGN, E>
impl<T, const N: usize, const ALIGN: usize, E: Endian> StaticSize for ZeroArray<T, N, ALIGN, E>
Source§impl<T: ZeroCopy, const N: usize, const ALIGN: usize, E: Endian> Validator for ZeroArray<T, N, ALIGN, E>
impl<T: ZeroCopy, const N: usize, const ALIGN: usize, E: Endian> Validator for ZeroArray<T, N, ALIGN, E>
Source§impl<T: ZeroCopy, const N: usize, const ALIGN: usize, E: Endian> ZeroCopy for ZeroArray<T, N, ALIGN, E>
impl<T: ZeroCopy, const N: usize, const ALIGN: usize, E: Endian> ZeroCopy for ZeroArray<T, N, ALIGN, E>
Source§impl<E: Endian, T, const N: usize, const ALIGN: usize> ZeroCopyType<E> for ZeroArray<T, N, ALIGN, E>where
T: ZeroCopy + ZeroCopyType<E>,
Available on crate feature alloc only.
impl<E: Endian, T, const N: usize, const ALIGN: usize> ZeroCopyType<E> for ZeroArray<T, N, ALIGN, E>where
T: ZeroCopy + ZeroCopyType<E>,
Available on crate feature
alloc only.Source§type Builder = ArrayBuilder<<T as ZeroCopyType<E>>::Builder, N, ALIGN>
type Builder = ArrayBuilder<<T as ZeroCopyType<E>>::Builder, N, ALIGN>
The builder type associated with this trait.
impl<T: Copy, const N: usize, const ALIGN: usize, E: Copy + Endian> Copy for ZeroArray<T, N, ALIGN, E>
impl<T: Eq, const N: usize, const ALIGN: usize, E: Eq + Endian> Eq for ZeroArray<T, N, ALIGN, E>
impl<T, const N: usize, const ALIGN: usize, E: Endian> StructuralPartialEq for ZeroArray<T, N, ALIGN, E>
Auto Trait Implementations§
impl<T, const N: usize, const ALIGN: usize, E> Freeze for ZeroArray<T, N, ALIGN, E>
impl<T, const N: usize, const ALIGN: usize, E> RefUnwindSafe for ZeroArray<T, N, ALIGN, E>where
E: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, const N: usize, const ALIGN: usize, E> Send for ZeroArray<T, N, ALIGN, E>
impl<T, const N: usize, const ALIGN: usize, E> Sync for ZeroArray<T, N, ALIGN, E>
impl<T, const N: usize, const ALIGN: usize, E> Unpin for ZeroArray<T, N, ALIGN, E>
impl<T, const N: usize, const ALIGN: usize, E> UnsafeUnpin for ZeroArray<T, N, ALIGN, E>
impl<T, const N: usize, const ALIGN: usize, E> UnwindSafe for ZeroArray<T, N, ALIGN, E>where
E: UnwindSafe,
T: UnwindSafe,
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