BytesMutExt

Trait BytesMutExt 

Source
pub trait BytesMutExt: AsBytesMutRef + BytesExt {
Show 13 methods // Provided methods fn to_u16_slice_mut(&mut self) -> &[u16] { ... } fn to_u32_slice_mut(&mut self) -> &[u32] { ... } fn to_usize_slice_mut(&mut self) -> &[usize] { ... } fn to_u64_slice_mut(&mut self) -> &[u64] { ... } fn to_u128_slice_mut(&mut self) -> &[u128] { ... } fn to_i8_slice_mut(&mut self) -> &[i8] { ... } fn to_i16_slice_mut(&mut self) -> &[i16] { ... } fn to_i32_slice_mut(&mut self) -> &[i32] { ... } fn to_i64_slice_mut(&mut self) -> &[i64] { ... } fn to_isize_slice_mut(&mut self) -> &[isize] { ... } fn to_i128_slice_mut(&mut self) -> &[i128] { ... } fn to_f32_slice_mut(&mut self) -> &[f32] { ... } fn to_f64_slice_mut(&mut self) -> &[f64] { ... }
}
Expand description

Extensions for mutable bytes

Provided Methods§

Source

fn to_u16_slice_mut(&mut self) -> &[u16]

Convert mutable u8 slice to mutableu16 slice in native-endian(zero-copy)

Source

fn to_u32_slice_mut(&mut self) -> &[u32]

Convert mutable u8 slice to mutableu32 slice in native-endian(zero-copy)

Source

fn to_usize_slice_mut(&mut self) -> &[usize]

Convert mutable u8 slice to mutableusize slice in native-endian(zero-copy)

Source

fn to_u64_slice_mut(&mut self) -> &[u64]

Convert mutable u8 slice to mutableu64 slice in native-endian(zero-copy)

Source

fn to_u128_slice_mut(&mut self) -> &[u128]

Convert mutable u8 slice to mutableu128 slice in native-endian(zero-copy)

Source

fn to_i8_slice_mut(&mut self) -> &[i8]

Convert mutable u8 slice to mutablei8 slice in native-endian(zero-copy)

Source

fn to_i16_slice_mut(&mut self) -> &[i16]

Convert mutable u8 slice to mutablei16 slice in native-endian(zero-copy)

Source

fn to_i32_slice_mut(&mut self) -> &[i32]

Convert mutable u8 slice to mutablei32 slice in native-endian(zero-copy)

Source

fn to_i64_slice_mut(&mut self) -> &[i64]

Convert mutable u8 slice to mutablei64 slice in native-endian(zero-copy)

Source

fn to_isize_slice_mut(&mut self) -> &[isize]

Convert mutable u8 slice to mutableisize slice in native-endian(zero-copy)

Source

fn to_i128_slice_mut(&mut self) -> &[i128]

Convert mutable u8 slice to mutablei128 slice in native-endian(zero-copy)

Source

fn to_f32_slice_mut(&mut self) -> &[f32]

Convert mutable u8 slice to mutablef32 slice in native-endian(zero-copy)

Source

fn to_f64_slice_mut(&mut self) -> &[f64]

Convert mutable u8 slice to mutablef64 slice in native-endian(zero-copy)

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 BytesMutExt for Box<[u8]>

Available on crate feature alloc only.
Source§

impl BytesMutExt for Vec<u8>

Available on crate feature alloc only.
Source§

impl BytesMutExt for BytesMut

Available on crate feature bytes only.
Source§

impl<'a> BytesMutExt for &'a mut Box<[u8]>

Available on crate feature alloc only.
Source§

impl<'a> BytesMutExt for &'a mut Vec<u8>

Available on crate feature alloc only.
Source§

impl<'a> BytesMutExt for &'a mut BytesMut

Available on crate feature bytes only.
Source§

impl<'a> BytesMutExt for &'a mut [u8]

Source§

impl<const N: usize> BytesMutExt for [u8; N]

Implementors§