[][src]Struct const_sha1::ConstBuffer

pub struct ConstBuffer { /* fields omitted */ }

A buffer of a constant size suitable for use in const contexts

Implementations

impl ConstBuffer[src]

pub const fn from_slice(slice: &[u8]) -> Self[src]

Convert a slice into a ConstBuffer

pub const fn new() -> Self[src]

Create an empty ConstBuffer

pub const fn push_slice(self, slice: &[u8]) -> Self[src]

Push a slice of bytes on to the buffer

pub const fn get(&self, index: usize) -> u8[src]

Get a byte at a given index

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

Get the length of the buffer that has been written to

pub const fn as_slice(&self) -> &[u8][src]

Get the buffer as a slice

pub const fn push_other(self, other: Self) -> Self[src]

Push another ConstBuffer on to the current buffer

Trait Implementations

impl Debug for ConstBuffer[src]

Auto Trait Implementations

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, 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.