pub trait NewBytes: MutBytes {
// Required method
fn new_bytes() -> Self;
}Expand description
Arbitrary-length byte array that can be created and initialized.
Required Methods§
Sourcefn new_bytes() -> Self
fn new_bytes() -> Self
Returns a new byte array. Fixed-length types (such as
StackByteArray, [u8; LENGTH] and HeapByteArray) hold LENGTH
zero bytes; resizable types (such as Vec<u8> and HeapBytes) are
empty.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Implementors§
impl NewBytes for HeapBytes
Available on crate feature
protected only.impl NewBytes for Protected<HeapBytes, ReadWrite, Locked>
Available on crate feature
protected only.impl<const LENGTH: usize> NewBytes for HeapByteArray<LENGTH>
Available on crate feature
protected only.impl<const LENGTH: usize> NewBytes for Protected<HeapByteArray<LENGTH>, ReadWrite, Locked>
Available on crate feature
protected only.