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

Required Methods§

source

fn len(&self) -> usize

source

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

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl BufferRef for [u8]

source§

fn len(&self) -> usize

source§

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

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§

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§

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

source§

fn len(&self) -> usize

source§

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

Implementors§

source§

impl BufferRef for Vec<u8>

source§

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

source§

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

source§

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