pub trait ByteArray<const LENGTH: usize>: Bytes {
// Required method
fn as_array(&self) -> &[u8; LENGTH];
}
Expand description
Fixed-length byte array.
Required Methods§
Implementations on Foreign Types§
source§impl<const LENGTH: usize> ByteArray<LENGTH> for &[u8]
impl<const LENGTH: usize> ByteArray<LENGTH> for &[u8]
Provided for convenience. Panics if the input array size doesn’t match
LENGTH
.
Implementors§
impl<const LENGTH: usize> ByteArray<LENGTH> for HeapByteArray<LENGTH>
Available on crate feature
nightly
only.impl<const LENGTH: usize> ByteArray<LENGTH> for Protected<HeapByteArray<LENGTH>, ReadOnly, Locked>
Available on crate feature
nightly
only.impl<const LENGTH: usize> ByteArray<LENGTH> for Protected<HeapByteArray<LENGTH>, ReadOnly, Unlocked>
Available on crate feature
nightly
only.impl<const LENGTH: usize> ByteArray<LENGTH> for Protected<HeapByteArray<LENGTH>, ReadWrite, Locked>
Available on crate feature
nightly
only.impl<const LENGTH: usize> ByteArray<LENGTH> for Protected<HeapByteArray<LENGTH>, ReadWrite, Unlocked>
Available on crate feature
nightly
only.