Struct static_buffer::FixedBuffer
[−]
[src]
pub struct FixedBuffer<N: ArrayLength<u8>> { /* fields omitted */ }
Methods
impl<N: ArrayLength<u8>> FixedBuffer<N>
[src]
fn new() -> Self
Create a new buffer
Trait Implementations
impl<N: ArrayLength<u8>> FixedBuf for FixedBuffer<N>
[src]
fn input<F: FnMut(&[u8])>(&mut self, input: &[u8], func: F)
Input a vector of bytes. If the buffer becomes full, process it with the provided function and then clear the buffer. Read more
fn reset(&mut self)
Reset the buffer.
fn zero_until(&mut self, idx: usize)
Zero the buffer up until the specified index. The buffer position currently must not be greater than that index. Read more
fn next(&mut self, len: usize) -> &mut [u8]
Get a slice of the buffer of the specified size. There must be at least that many bytes remaining in the buffer. Read more
fn full_buffer(&mut self) -> &mut [u8]
Get the current buffer. The buffer must already be full. This clears the buffer as well.
fn current_buffer(&self) -> &[u8]
Get the current buffer.
fn position(&self) -> usize
Get the current position of the buffer.
fn remaining(&self) -> usize
Get the number of bytes remaining in the buffer until it is full.
fn size() -> usize
Get the size of the buffer
impl<N: ArrayLength<u8>> Clone for FixedBuffer<N>
[src]
fn clone(&self) -> Self
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more