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

source§

fn len(&self) -> usize

source§

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

source§

impl BufferRef for [u8]

source§

fn len(&self) -> usize

source§

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

source§

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

source§

fn len(&self) -> usize

source§

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

source§

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

source§

fn len(&self) -> usize

source§

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

source§

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

source§

fn len(&self) -> usize

source§

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

source§

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

source§

fn len(&self) -> usize

source§

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

source§

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

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§