Trait ByteSlice

Source
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§

Source

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.

Implementations on Foreign Types§

Source§

impl<T> ByteSlice for &T
where T: ByteSlice,

Source§

impl<T> ByteSlice for &mut T
where T: ByteSlice,

Implementors§

Source§

impl ByteSlice for RdhCru

Auto implement ByteSlice for the following structs.