pub trait BufferMut {
    // Required methods
    fn capacity(&self) -> usize;
    fn write<const N: usize>(&mut self, offset: usize, val: &[u8; N]);

    // Provided method
    fn try_enlarge(&mut self, wanted: usize) -> Result<(), EnlargeError> { ... }
}

Required Methods§

source

fn capacity(&self) -> usize

source

fn write<const N: usize>(&mut self, offset: usize, val: &[u8; N])

Provided Methods§

source

fn try_enlarge(&mut self, wanted: usize) -> Result<(), EnlargeError>

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl BufferMut for Vec<u8>

source§

fn capacity(&self) -> usize

source§

fn write<const N: usize>(&mut self, offset: usize, val: &[u8; N])

source§

fn try_enlarge(&mut self, wanted: usize) -> Result<(), EnlargeError>

source§

impl BufferMut for [u8]

source§

fn capacity(&self) -> usize

source§

fn write<const N: usize>(&mut self, offset: usize, val: &[u8; N])

source§

impl<T> BufferMut for &mut T
where T: BufferMut + ?Sized,

source§

fn capacity(&self) -> usize

source§

fn write<const N: usize>(&mut self, offset: usize, val: &[u8; N])

source§

fn try_enlarge(&mut self, wanted: usize) -> Result<(), EnlargeError>

source§

impl<T> BufferMut for Box<T>
where T: BufferMut + ?Sized,

source§

fn capacity(&self) -> usize

source§

fn write<const N: usize>(&mut self, offset: usize, val: &[u8; N])

source§

fn try_enlarge(&mut self, wanted: usize) -> Result<(), EnlargeError>

source§

impl<const LEN: usize> BufferMut for [u8; LEN]

source§

fn capacity(&self) -> usize

source§

fn write<const N: usize>(&mut self, offset: usize, val: &[u8; N])

Implementors§