pub trait ByteSlice: Sized {
// Provided method
fn to_byte_slice(&self) -> &[u8] ⓘ { ... }
}Expand description
Trait used to convert a struct to a byte slice. All structs that are used to represent a full GBT word (not sub RDH words) must implement this trait.
Provided Methods§
Sourcefn to_byte_slice(&self) -> &[u8] ⓘ
fn to_byte_slice(&self) -> &[u8] ⓘ
Returns a borrowed byte slice of the struct.
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.