bevy_render::render_resource::encase::internal

Trait BufferRef

Source
pub trait BufferRef {
    // Required methods
    fn len(&self) -> usize;
    fn read<const N: usize>(&self, offset: usize) -> &[u8; N];
    fn read_slice(&self, offset: usize, val: &mut [u8]);
}

Required Methods§

Source

fn len(&self) -> usize

Source

fn read<const N: usize>(&self, offset: usize) -> &[u8; N]

Source

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

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 BufferRef for Vec<u8>

Source§

fn len(&self) -> usize

Source§

fn read<const N: usize>(&self, offset: usize) -> &[u8; N]

Source§

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

Source§

impl BufferRef for [u8]

Source§

fn len(&self) -> usize

Source§

fn read<const N: usize>(&self, offset: usize) -> &[u8; N]

Source§

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

Source§

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

Source§

fn len(&self) -> usize

Source§

fn read<const N: usize>(&self, offset: usize) -> &[u8; N]

Source§

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

Source§

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

Source§

fn len(&self) -> usize

Source§

fn read<const N: usize>(&self, offset: usize) -> &[u8; N]

Source§

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

Source§

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

Source§

fn len(&self) -> usize

Source§

fn read<const N: usize>(&self, offset: usize) -> &[u8; N]

Source§

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

Source§

impl<T> BufferRef for Rc<T>
where T: BufferRef + ?Sized,

Source§

fn len(&self) -> usize

Source§

fn read<const N: usize>(&self, offset: usize) -> &[u8; N]

Source§

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

Source§

impl<T> BufferRef for Arc<T>
where T: BufferRef + ?Sized,

Source§

fn len(&self) -> usize

Source§

fn read<const N: usize>(&self, offset: usize) -> &[u8; N]

Source§

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

Source§

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

Source§

fn len(&self) -> usize

Source§

fn read<const N: usize>(&self, offset: usize) -> &[u8; N]

Source§

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

Implementors§