Trait dryoc::types::NewByteArray

source ·
pub trait NewByteArray<const LENGTH: usize>: MutByteArray<LENGTH> + NewBytes {
    // Required methods
    fn new_byte_array() -> Self;
    fn gen() -> Self;
}
Expand description

Fixed-length byte array that can be created and initialized.

Required Methods§

source

fn new_byte_array() -> Self

Returns a new fixed-length byte array, initialized with zeroes.

source

fn gen() -> Self

Returns a new fixed-length byte array, filled with random values.

Implementations on Foreign Types§

source§

impl<const LENGTH: usize> NewByteArray<LENGTH> for [u8; LENGTH]

source§

fn gen() -> Self

Returns a new byte array filled with random data.

source§

fn new_byte_array() -> Self

source§

impl<const LENGTH: usize> NewByteArray<LENGTH> for Vec<u8>

source§

fn gen() -> Self

Returns a new byte array filled with random data.

source§

fn new_byte_array() -> Self

Implementors§

source§

impl<const LENGTH: usize> NewByteArray<LENGTH> for HeapByteArray<LENGTH>

Available on crate feature nightly only.
source§

impl<const LENGTH: usize> NewByteArray<LENGTH> for Protected<HeapByteArray<LENGTH>, ReadWrite, Locked>

Available on crate feature nightly only.
source§

impl<const LENGTH: usize> NewByteArray<LENGTH> for StackByteArray<LENGTH>