Trait bevy_render::render_resource::encase::internal::BufferMut

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

    // 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])

source

fn write_slice(&mut self, offset: usize, val: &[u8])

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 write_slice(&mut self, offset: usize, val: &[u8])

source§

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

source§

impl BufferMut for Vec<MaybeUninit<u8>>

source§

fn capacity(&self) -> usize

source§

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

source§

fn write_slice(&mut self, offset: usize, val: &[u8])

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§

fn write_slice(&mut self, offset: usize, val: &[u8])

source§

impl BufferMut for [MaybeUninit<u8>]

source§

fn capacity(&self) -> usize

source§

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

source§

fn write_slice(&mut self, offset: usize, val: &[u8])

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 write_slice(&mut self, offset: usize, val: &[u8])

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 write_slice(&mut self, offset: usize, val: &[u8])

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])

source§

fn write_slice(&mut self, offset: usize, val: &[u8])

source§

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

source§

fn capacity(&self) -> usize

source§

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

source§

fn write_slice(&mut self, offset: usize, val: &[u8])

Implementors§