bevy_render::render_resource::encase::internal

Trait 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>

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 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§