Struct block_buffer::LazyBlockBuffer[][src]

pub struct LazyBlockBuffer<BlockSize: ArrayLength<u8>> { /* fields omitted */ }

Buffer for lazy block processing of data.

Implementations

impl<BlockSize: ArrayLength<u8>> LazyBlockBuffer<BlockSize>[src]

pub fn pad_zeros(&mut self) -> &mut Block<BlockSize>[src]

Pad remaining data with zeros and call compress with resulting block.

pub fn size(&self) -> usize[src]

Return size of the internall buffer in bytes.

pub fn remaining(&self) -> usize[src]

Return number of remaining bytes in the internall buffer.

pub fn reset(&mut self)[src]

Reset buffer by setting cursor position to zero.

pub fn get_pos(&self) -> usize[src]

Return current cursor position.

pub fn set(&mut self, buf: Block<BlockSize>, pos: usize)[src]

Set buffer content and cursor position.

Panics

If pos is bigger or equal to block size.

Trait Implementations

impl<BlockSize: Clone + ArrayLength<u8>> Clone for LazyBlockBuffer<BlockSize>[src]

impl<BlockSize: Default + ArrayLength<u8>> Default for LazyBlockBuffer<BlockSize>[src]

impl<B: ArrayLength<u8>> DigestBuffer<B> for LazyBlockBuffer<B>[src]

Auto Trait Implementations

impl<BlockSize> Send for LazyBlockBuffer<BlockSize>

impl<BlockSize> Sync for LazyBlockBuffer<BlockSize>

impl<BlockSize> Unpin for LazyBlockBuffer<BlockSize> where
    <BlockSize as ArrayLength<u8>>::ArrayType: Unpin

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.