Struct digest::core_api::CoreWrapper
source · [−]pub struct CoreWrapper<T> where
T: BufferKindUser,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero, { /* private fields */ }
Expand description
Wrapper around BufferKindUser
.
It handles data buffering and implements the slice-based traits.
Implementations
Trait Implementations
sourceimpl<T> BlockSizeUser for CoreWrapper<T> where
T: BufferKindUser + HashMarker,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
impl<T> BlockSizeUser for CoreWrapper<T> where
T: BufferKindUser + HashMarker,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
type BlockSize = <T as BlockSizeUser>::BlockSize
type BlockSize = <T as BlockSizeUser>::BlockSize
Size of the block in bytes.
sourcefn block_size() -> usize
fn block_size() -> usize
Return block size in bytes.
sourceimpl<T: Clone> Clone for CoreWrapper<T> where
T: BufferKindUser,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
T::BlockSize: Clone,
T::BufferKind: Clone,
impl<T: Clone> Clone for CoreWrapper<T> where
T: BufferKindUser,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
T::BlockSize: Clone,
T::BufferKind: Clone,
sourcefn clone(&self) -> CoreWrapper<T>ⓘNotable traits for CoreWrapper<T>impl<T> Write for CoreWrapper<T> where
T: BufferKindUser + UpdateCore,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
fn clone(&self) -> CoreWrapper<T>ⓘNotable traits for CoreWrapper<T>impl<T> Write for CoreWrapper<T> where
T: BufferKindUser + UpdateCore,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
T: BufferKindUser + UpdateCore,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<T> CoreProxy for CoreWrapper<T> where
T: BufferKindUser,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
impl<T> CoreProxy for CoreWrapper<T> where
T: BufferKindUser,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
type Core = T
type Core = T
Type wrapped by CoreWrapper
.
sourceimpl<T> Debug for CoreWrapper<T> where
T: BufferKindUser + AlgorithmName,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
impl<T> Debug for CoreWrapper<T> where
T: BufferKindUser + AlgorithmName,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
sourceimpl<T: Default> Default for CoreWrapper<T> where
T: BufferKindUser,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
T::BlockSize: Default,
T::BufferKind: Default,
impl<T: Default> Default for CoreWrapper<T> where
T: BufferKindUser,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
T::BlockSize: Default,
T::BufferKind: Default,
sourcefn default() -> CoreWrapper<T>ⓘNotable traits for CoreWrapper<T>impl<T> Write for CoreWrapper<T> where
T: BufferKindUser + UpdateCore,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
fn default() -> CoreWrapper<T>ⓘNotable traits for CoreWrapper<T>impl<T> Write for CoreWrapper<T> where
T: BufferKindUser + UpdateCore,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
T: BufferKindUser + UpdateCore,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
Returns the “default value” for a type. Read more
sourceimpl<T> ExtendableOutput for CoreWrapper<T> where
T: ExtendableOutputCore,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
<T::ReaderCore as BlockSizeUser>::BlockSize: IsLess<U256>,
Le<<T::ReaderCore as BlockSizeUser>::BlockSize, U256>: NonZero,
impl<T> ExtendableOutput for CoreWrapper<T> where
T: ExtendableOutputCore,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
<T::ReaderCore as BlockSizeUser>::BlockSize: IsLess<U256>,
Le<<T::ReaderCore as BlockSizeUser>::BlockSize, U256>: NonZero,
type Reader = XofReaderCoreWrapper<<T as ExtendableOutputCore>::ReaderCore>
type Reader = XofReaderCoreWrapper<<T as ExtendableOutputCore>::ReaderCore>
Reader
sourcefn finalize_xof(self) -> Self::Reader
fn finalize_xof(self) -> Self::Reader
Retrieve XOF reader and consume hasher instance.
sourcefn finalize_xof_into(self, out: &mut [u8])
fn finalize_xof_into(self, out: &mut [u8])
Finalize XOF and write result into out
.
sourceimpl<T> ExtendableOutputReset for CoreWrapper<T> where
T: ExtendableOutputCore + Reset,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
<T::ReaderCore as BlockSizeUser>::BlockSize: IsLess<U256>,
Le<<T::ReaderCore as BlockSizeUser>::BlockSize, U256>: NonZero,
impl<T> ExtendableOutputReset for CoreWrapper<T> where
T: ExtendableOutputCore + Reset,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
<T::ReaderCore as BlockSizeUser>::BlockSize: IsLess<U256>,
Le<<T::ReaderCore as BlockSizeUser>::BlockSize, U256>: NonZero,
sourcefn finalize_xof_reset(&mut self) -> Self::Reader
fn finalize_xof_reset(&mut self) -> Self::Reader
Retrieve XOF reader and reset hasher instance state.
sourcefn finalize_xof_reset_into(&mut self, out: &mut [u8])
fn finalize_xof_reset_into(&mut self, out: &mut [u8])
Finalize XOF, write result into out
, and reset the hasher state.
sourceimpl<T> FixedOutput for CoreWrapper<T> where
T: FixedOutputCore,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
impl<T> FixedOutput for CoreWrapper<T> where
T: FixedOutputCore,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
sourcefn finalize_into(self, out: &mut Output<Self>)
fn finalize_into(self, out: &mut Output<Self>)
Consume value and write result into provided array.
sourcefn finalize_fixed(self) -> Output<Self>
fn finalize_fixed(self) -> Output<Self>
Retrieve result and consume the hasher instance.
sourceimpl<T> FixedOutputReset for CoreWrapper<T> where
T: FixedOutputCore + Reset,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
impl<T> FixedOutputReset for CoreWrapper<T> where
T: FixedOutputCore + Reset,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
sourcefn finalize_into_reset(&mut self, out: &mut Output<Self>)
fn finalize_into_reset(&mut self, out: &mut Output<Self>)
Write result into provided array and reset the hasher state.
sourcefn finalize_fixed_reset(&mut self) -> Output<Self>
fn finalize_fixed_reset(&mut self) -> Output<Self>
Retrieve result and reset the hasher state.
sourceimpl<T> KeyInit for CoreWrapper<T> where
T: BufferKindUser + KeyInit,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
impl<T> KeyInit for CoreWrapper<T> where
T: BufferKindUser + KeyInit,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
sourcefn new_from_slice(key: &[u8]) -> Result<Self, InvalidLength>
fn new_from_slice(key: &[u8]) -> Result<Self, InvalidLength>
Create new value from variable size key.
sourceimpl<T> KeySizeUser for CoreWrapper<T> where
T: BufferKindUser + KeySizeUser,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
impl<T> KeySizeUser for CoreWrapper<T> where
T: BufferKindUser + KeySizeUser,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
sourceimpl<T> OutputSizeUser for CoreWrapper<T> where
T: BufferKindUser + OutputSizeUser,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
impl<T> OutputSizeUser for CoreWrapper<T> where
T: BufferKindUser + OutputSizeUser,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
type OutputSize = <T as OutputSizeUser>::OutputSize
type OutputSize = <T as OutputSizeUser>::OutputSize
Size of the output in bytes.
sourcefn output_size() -> usize
fn output_size() -> usize
Return output size in bytes.
sourceimpl<T> Reset for CoreWrapper<T> where
T: BufferKindUser + Reset,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
impl<T> Reset for CoreWrapper<T> where
T: BufferKindUser + Reset,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
sourceimpl<T> Update for CoreWrapper<T> where
T: BufferKindUser + UpdateCore,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
impl<T> Update for CoreWrapper<T> where
T: BufferKindUser + UpdateCore,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
sourceimpl<T> Write for CoreWrapper<T> where
T: BufferKindUser + UpdateCore,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
impl<T> Write for CoreWrapper<T> where
T: BufferKindUser + UpdateCore,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
sourcefn write(&mut self, buf: &[u8]) -> Result<usize>
fn write(&mut self, buf: &[u8]) -> Result<usize>
Write a buffer into this writer, returning how many bytes were written. Read more
sourcefn flush(&mut self) -> Result<()>
fn flush(&mut self) -> Result<()>
Flush this output stream, ensuring that all intermediately buffered contents reach their destination. Read more
sourcefn is_write_vectored(&self) -> bool
fn is_write_vectored(&self) -> bool
can_vector
)Determines if this Write
r has an efficient write_vectored
implementation. Read more
1.0.0 · sourcefn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
Attempts to write an entire buffer into this writer. Read more
sourcefn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>
fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>
write_all_vectored
)Attempts to write multiple buffers into this writer. Read more
impl<T> HashMarker for CoreWrapper<T> where
T: BufferKindUser + HashMarker,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
impl<T> MacMarker for CoreWrapper<T> where
T: BufferKindUser + MacMarker,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
Auto Trait Implementations
impl<T> RefUnwindSafe for CoreWrapper<T> where
T: RefUnwindSafe,
<<T as BlockSizeUser>::BlockSize as ArrayLength<u8>>::ArrayType: RefUnwindSafe,
<T as BufferKindUser>::BufferKind: RefUnwindSafe,
impl<T> Send for CoreWrapper<T> where
T: Send,
<T as BufferKindUser>::BufferKind: Send,
impl<T> Sync for CoreWrapper<T> where
T: Sync,
<T as BufferKindUser>::BufferKind: Sync,
impl<T> Unpin for CoreWrapper<T> where
T: Unpin,
<<T as BlockSizeUser>::BlockSize as ArrayLength<u8>>::ArrayType: Unpin,
<T as BufferKindUser>::BufferKind: Unpin,
impl<T> UnwindSafe for CoreWrapper<T> where
T: UnwindSafe,
<<T as BlockSizeUser>::BlockSize as ArrayLength<u8>>::ArrayType: UnwindSafe,
<T as BufferKindUser>::BufferKind: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more