[−][src]Struct const_sha1::ConstBuffer
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
Auto Trait Implementations
impl RefUnwindSafe for ConstBuffer
impl Send for ConstBuffer
impl Sync for ConstBuffer
impl Unpin for ConstBuffer
impl UnwindSafe for ConstBuffer
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,