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§

source

fn as_byte_slice_mut(&mut self) -> &mut [u8]

Performs conversion to a mutable byte slice.

source

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.

Implementations on Foreign Types§

source§

impl AsByteSliceMut for [i8]

source§

fn as_byte_slice_mut(&mut self) -> &mut [u8]

source§

fn convert_to_le(&mut self)

source§

impl AsByteSliceMut for [i16]

source§

fn as_byte_slice_mut(&mut self) -> &mut [u8]

source§

fn convert_to_le(&mut self)

source§

impl AsByteSliceMut for [i32]

source§

fn as_byte_slice_mut(&mut self) -> &mut [u8]

source§

fn convert_to_le(&mut self)

source§

impl AsByteSliceMut for [i64]

source§

fn as_byte_slice_mut(&mut self) -> &mut [u8]

source§

fn convert_to_le(&mut self)

source§

impl AsByteSliceMut for [i128]

source§

fn as_byte_slice_mut(&mut self) -> &mut [u8]

source§

fn convert_to_le(&mut self)

source§

impl AsByteSliceMut for [u8]

source§

fn as_byte_slice_mut(&mut self) -> &mut [u8]

source§

fn convert_to_le(&mut self)

source§

impl AsByteSliceMut for [u16]

source§

fn as_byte_slice_mut(&mut self) -> &mut [u8]

source§

fn convert_to_le(&mut self)

source§

impl AsByteSliceMut for [u32]

source§

fn as_byte_slice_mut(&mut self) -> &mut [u8]

source§

fn convert_to_le(&mut self)

source§

impl AsByteSliceMut for [u64]

source§

fn as_byte_slice_mut(&mut self) -> &mut [u8]

source§

fn convert_to_le(&mut self)

source§

impl AsByteSliceMut for [u128]

source§

fn as_byte_slice_mut(&mut self) -> &mut [u8]

source§

fn convert_to_le(&mut self)

source§

impl<T, const N: usize> AsByteSliceMut for [T; N]

source§

fn as_byte_slice_mut(&mut self) -> &mut [u8]

source§

fn convert_to_le(&mut self)

Implementors§