Trait NewBytes

Source
pub trait NewBytes: MutBytes {
    // Required method
    fn new_bytes() -> Self;
}
Expand description

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

Required Methods§

Source

fn new_bytes() -> Self

Returns an empty, unallocated, arbitrary-length byte array.

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 NewBytes for Vec<u8>

Source§

fn new_bytes() -> Self

Source§

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

Source§

fn new_bytes() -> Self

Implementors§

Source§

impl NewBytes for HeapBytes

Available on crate feature nightly only.
Source§

impl NewBytes for Protected<HeapBytes, ReadWrite, Locked>

Available on crate feature nightly only.
Source§

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

Available on crate feature nightly only.
Source§

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

Available on crate feature nightly only.
Source§

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