Trait encase::internal::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])

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§

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: ?Sized + BufferRef> BufferRef for &T

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: ?Sized + BufferRef> BufferRef for &mut T

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: ?Sized + BufferRef> BufferRef for Box<T>

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: ?Sized + BufferRef> BufferRef for Rc<T>

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: ?Sized + BufferRef> BufferRef for Arc<T>

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§