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§
sourcefn as_mut_slice(&mut self) -> &mut [u8] ⓘ
fn as_mut_slice(&mut self) -> &mut [u8] ⓘ
Returns a mutable slice to the underlying bytes.
sourcefn copy_from_slice(&mut self, other: &[u8])
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 [u8]
impl MutBytes for [u8]
fn as_mut_slice(&mut self) -> &mut [u8] ⓘ
fn copy_from_slice(&mut self, other: &[u8])
source§impl MutBytes for Vec<u8>
impl MutBytes for Vec<u8>
fn as_mut_slice(&mut self) -> &mut [u8] ⓘ
fn copy_from_slice(&mut self, other: &[u8])
source§impl<const LENGTH: usize> MutBytes for [u8; LENGTH]
impl<const LENGTH: usize> MutBytes for [u8; LENGTH]
fn as_mut_slice(&mut self) -> &mut [u8] ⓘ
fn copy_from_slice(&mut self, other: &[u8])
Implementors§
impl MutBytes for HeapBytes
Available on crate feature
nightly
only.impl<A: Zeroize + MutBytes, LM: LockMode> MutBytes for Protected<A, ReadWrite, LM>
Available on crate feature
nightly
only.impl<const LENGTH: usize> MutBytes for HeapByteArray<LENGTH>
Available on crate feature
nightly
only.