Trait dryoc::types::MutBytes

source ·
pub trait MutBytes: Bytes {
    // Required methods
    fn as_mut_slice(&mut self) -> &mut [u8] ;
    fn copy_from_slice(&mut self, other: &[u8]);
}
Expand description

Arbitrary-length array of mutable bytes.

Required Methods§

source

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

Returns a mutable slice to the underlying bytes.

source

fn copy_from_slice(&mut self, other: &[u8])

Copies into the underlying slice from other. Panics if lengths do not match.

Implementations on Foreign Types§

source§

impl MutBytes for Vec<u8>

source§

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

source§

fn copy_from_slice(&mut self, other: &[u8])

source§

impl MutBytes for [u8]

source§

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

source§

fn copy_from_slice(&mut self, other: &[u8])

source§

impl<const LENGTH: usize> MutBytes for [u8; LENGTH]

source§

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

source§

fn copy_from_slice(&mut self, other: &[u8])

Implementors§

source§

impl MutBytes for HeapBytes

Available on crate feature nightly only.
source§

impl<A: Zeroize + MutBytes, LM: LockMode> MutBytes for Protected<A, ReadWrite, LM>

Available on crate feature nightly only.
source§

impl<const LENGTH: usize> MutBytes for HeapByteArray<LENGTH>

Available on crate feature nightly only.
source§

impl<const LENGTH: usize> MutBytes for StackByteArray<LENGTH>