Trait ByteArray

Source
pub trait ByteArray:
    AsRef<[u8]>
    + AsMut<[u8]>
    + Clone
    + Send
    + Sync
    + 'static {
    // Required method
    fn zeroes() -> Self;
}
Expand description

Byte array

Required Methods§

Source

fn zeroes() -> Self

New byte array of zeroes

Alternative to Default that is not implemented for generic [T; N] (see tracking issue)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<N: ArrayLength<u8>> ByteArray for GenericArray<u8, N>

Source§

fn zeroes() -> Self

Source§

impl<const N: usize> ByteArray for [u8; N]

Source§

fn zeroes() -> Self

Implementors§