Trait secret_tree::AsByteSliceMut
source · pub trait AsByteSliceMut {
// Required methods
fn as_byte_slice_mut(&mut self) -> &mut [u8] ⓘ;
fn convert_to_le(&mut self);
}
Expand description
Converts a type to a mutable byte slice. This is used within the crate to fill secret values with the RNG output.
This trait is implemented for numeric types (u8
, i8
, …, u128
, i128
), slices
of these types, and arrays of small sizes (1..=64).
Required Methods§
sourcefn as_byte_slice_mut(&mut self) -> &mut [u8] ⓘ
fn as_byte_slice_mut(&mut self) -> &mut [u8] ⓘ
Performs conversion to a mutable byte slice.
sourcefn convert_to_le(&mut self)
fn convert_to_le(&mut self)
Converts values within this type to the little-endian byte order.
This method is called after filling bytes to achieve uniform behavior across big-endian and little-endian platforms.