crypto::buffer

Trait WriteBuffer

Source
pub trait WriteBuffer {
    // Required methods
    fn is_empty(&self) -> bool;
    fn is_full(&self) -> bool;
    fn remaining(&self) -> usize;
    fn capacity(&self) -> usize;
    fn rewind(&mut self, distance: usize);
    fn reset(&mut self);
    fn peek_read_buffer(&mut self) -> RefReadBuffer<'_>;
    fn take_next(&mut self, count: usize) -> &mut [u8] ;
    fn take_read_buffer(&mut self) -> RefReadBuffer<'_>;

    // Provided methods
    fn position(&self) -> usize { ... }
    fn take_remaining(&mut self) -> &mut [u8]  { ... }
}

Required Methods§

Source

fn is_empty(&self) -> bool

Source

fn is_full(&self) -> bool

Source

fn remaining(&self) -> usize

Source

fn capacity(&self) -> usize

Source

fn rewind(&mut self, distance: usize)

Source

fn reset(&mut self)

Source

fn peek_read_buffer(&mut self) -> RefReadBuffer<'_>

Source

fn take_next(&mut self, count: usize) -> &mut [u8]

Source

fn take_read_buffer(&mut self) -> RefReadBuffer<'_>

Provided Methods§

Source

fn position(&self) -> usize

Source

fn take_remaining(&mut self) -> &mut [u8]

Implementors§