Struct digest::core_api::RtVariableCoreWrapper
source · pub struct RtVariableCoreWrapper<T>where
T: VariableOutputCore + UpdateCore,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,{ /* private fields */ }
Expand description
Wrapper around VariableOutputCore
which selects output size
at run time.
Trait Implementations§
source§impl<T> Clone for RtVariableCoreWrapper<T>where
T: VariableOutputCore + UpdateCore + Clone,
T::BlockSize: IsLess<U256> + Clone,
Le<T::BlockSize, U256>: NonZero,
T::BufferKind: Clone,
impl<T> Clone for RtVariableCoreWrapper<T>where
T: VariableOutputCore + UpdateCore + Clone,
T::BlockSize: IsLess<U256> + Clone,
Le<T::BlockSize, U256>: NonZero,
T::BufferKind: Clone,
source§impl<T> Debug for RtVariableCoreWrapper<T>where
T: VariableOutputCore + UpdateCore + AlgorithmName,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
impl<T> Debug for RtVariableCoreWrapper<T>where
T: VariableOutputCore + UpdateCore + AlgorithmName,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
source§impl<T> Reset for RtVariableCoreWrapper<T>where
T: VariableOutputCore + UpdateCore + Reset,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
impl<T> Reset for RtVariableCoreWrapper<T>where
T: VariableOutputCore + UpdateCore + Reset,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
source§impl<T> Update for RtVariableCoreWrapper<T>where
T: VariableOutputCore + UpdateCore,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
impl<T> Update for RtVariableCoreWrapper<T>where
T: VariableOutputCore + UpdateCore,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
source§impl<T> VariableOutput for RtVariableCoreWrapper<T>where
T: VariableOutputCore + UpdateCore,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
impl<T> VariableOutput for RtVariableCoreWrapper<T>where
T: VariableOutputCore + UpdateCore,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
source§const MAX_OUTPUT_SIZE: usize = <T::OutputSize>::USIZE
const MAX_OUTPUT_SIZE: usize = <T::OutputSize>::USIZE
Maximum size of output hash.
source§fn new(output_size: usize) -> Result<Self, InvalidOutputSize>
fn new(output_size: usize) -> Result<Self, InvalidOutputSize>
Create new hasher instance with the given output size. Read more
source§fn output_size(&self) -> usize
fn output_size(&self) -> usize
Get output size of the hasher instance provided to the
new
methodsource§fn finalize_variable(self, out: &mut [u8]) -> Result<(), InvalidBufferSize>
fn finalize_variable(self, out: &mut [u8]) -> Result<(), InvalidBufferSize>
Write result into the output buffer. Read more
source§fn digest_variable(
input: impl AsRef<[u8]>,
output: &mut [u8],
) -> Result<(), InvalidOutputSize>
fn digest_variable( input: impl AsRef<[u8]>, output: &mut [u8], ) -> Result<(), InvalidOutputSize>
source§impl<T> VariableOutputReset for RtVariableCoreWrapper<T>where
T: VariableOutputCore + UpdateCore + Reset,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
impl<T> VariableOutputReset for RtVariableCoreWrapper<T>where
T: VariableOutputCore + UpdateCore + Reset,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
source§fn finalize_variable_reset(
&mut self,
out: &mut [u8],
) -> Result<(), InvalidBufferSize>
fn finalize_variable_reset( &mut self, out: &mut [u8], ) -> Result<(), InvalidBufferSize>
Write result into the output buffer and reset the hasher state. Read more
source§impl<T> Write for RtVariableCoreWrapper<T>where
T: VariableOutputCore + UpdateCore,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
impl<T> Write for RtVariableCoreWrapper<T>where
T: VariableOutputCore + UpdateCore,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
source§fn 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
source§fn flush(&mut self) -> Result<()>
fn flush(&mut self) -> Result<()>
Flush this output stream, ensuring that all intermediately buffered
contents reach their destination. Read more
source§fn is_write_vectored(&self) -> bool
fn is_write_vectored(&self) -> bool
🔬This is a nightly-only experimental API. (
can_vector
)1.0.0 · source§fn 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
source§fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>
fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>
🔬This is a nightly-only experimental API. (
write_all_vectored
)Attempts to write multiple buffers into this writer. Read more
impl<T> HashMarker for RtVariableCoreWrapper<T>where
T: VariableOutputCore + HashMarker,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
Auto Trait Implementations§
impl<T> Freeze for RtVariableCoreWrapper<T>
impl<T> RefUnwindSafe for RtVariableCoreWrapper<T>where
T: RefUnwindSafe,
<<T as BlockSizeUser>::BlockSize as ArrayLength<u8>>::ArrayType: RefUnwindSafe,
<T as BufferKindUser>::BufferKind: RefUnwindSafe,
impl<T> Send for RtVariableCoreWrapper<T>
impl<T> Sync for RtVariableCoreWrapper<T>
impl<T> Unpin for RtVariableCoreWrapper<T>where
T: Unpin,
<<T as BlockSizeUser>::BlockSize as ArrayLength<u8>>::ArrayType: Unpin,
<T as BufferKindUser>::BufferKind: Unpin,
impl<T> UnwindSafe for RtVariableCoreWrapper<T>where
T: UnwindSafe,
<<T as BlockSizeUser>::BlockSize as ArrayLength<u8>>::ArrayType: UnwindSafe,
<T as BufferKindUser>::BufferKind: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more