Skip to main content

CryptoSystemBuffer

Trait CryptoSystemBuffer 

Source
pub trait CryptoSystemBuffer: AsRef<[u8]> + AsMut<[u8]> {
    // Required methods
    fn len(&self) -> usize;
    fn is_empty(&self) -> bool;
    fn extend_from_slice(&mut self, other: &[u8]);
    fn truncate(&mut self, len: usize);
}

Required Methods§

Source

fn len(&self) -> usize

Get the length of the buffer

Source

fn is_empty(&self) -> bool

Is the buffer empty?

Source

fn extend_from_slice(&mut self, other: &[u8])

Extend this buffer from the given slice

Source

fn truncate(&mut self, len: usize)

Truncate this buffer to the given size

Implementations on Foreign Types§

Source§

impl CryptoSystemBuffer for Vec<u8>

Source§

fn len(&self) -> usize

Source§

fn is_empty(&self) -> bool

Source§

fn extend_from_slice(&mut self, other: &[u8])

Source§

fn truncate(&mut self, len: usize)

Source§

impl CryptoSystemBuffer for BytesMut

Source§

fn len(&self) -> usize

Source§

fn is_empty(&self) -> bool

Source§

fn extend_from_slice(&mut self, other: &[u8])

Source§

fn truncate(&mut self, len: usize)

Implementors§