pub trait ByteArray: Clone {
// Required methods
fn len() -> usize;
fn as_bytes_slice(&self) -> &[u8] ⓘ;
fn as_mut_bytes_slice(&mut self) -> &mut [u8] ⓘ;
fn rotate_right(&mut self, bytes: usize);
fn new(value: u8) -> Self;
}Expand description
Helper that allows us to cast a fixed size array into a byte slice.
Required Methods§
fn len() -> usize
fn as_bytes_slice(&self) -> &[u8] ⓘ
fn as_mut_bytes_slice(&mut self) -> &mut [u8] ⓘ
fn rotate_right(&mut self, bytes: usize)
fn new(value: u8) -> Self
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.