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
sourceimpl<T: Clone> Clone for RtVariableCoreWrapper<T> where
T: VariableOutputCore + UpdateCore,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
T::BlockSize: Clone,
T::BufferKind: Clone,
impl<T: Clone> Clone for RtVariableCoreWrapper<T> where
T: VariableOutputCore + UpdateCore,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
T::BlockSize: Clone,
T::BufferKind: Clone,
sourcefn clone(&self) -> RtVariableCoreWrapper<T>ⓘNotable traits for RtVariableCoreWrapper<T>impl<T> Write for RtVariableCoreWrapper<T> where
T: VariableOutputCore + UpdateCore,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
fn clone(&self) -> RtVariableCoreWrapper<T>ⓘNotable traits for RtVariableCoreWrapper<T>impl<T> Write for RtVariableCoreWrapper<T> where
T: VariableOutputCore + UpdateCore,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
T: VariableOutputCore + 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> 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,
sourceimpl<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,
sourceimpl<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,
sourceimpl<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,
sourceconst MAX_OUTPUT_SIZE: usize = T::OutputSize::USIZE
const MAX_OUTPUT_SIZE: usize = T::OutputSize::USIZE
Maximum size of output hash.
sourcefn 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
sourcefn output_size(&self) -> usize
fn output_size(&self) -> usize
Get output size of the hasher instance provided to the new
method
sourcefn 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
sourcefn digest_variable(
input: impl AsRef<[u8]>,
output: &mut [u8]
) -> Result<(), InvalidOutputSize>
fn digest_variable(
input: impl AsRef<[u8]>,
output: &mut [u8]
) -> Result<(), InvalidOutputSize>
Compute hash of data
and write it to output
. Read more
sourcefn finalize_boxed(self) -> Box<[u8]>
fn finalize_boxed(self) -> Box<[u8]>
Retrieve result into a boxed slice and consume hasher. Read more
sourceimpl<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,
sourcefn 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
sourcefn finalize_boxed_reset(&mut self) -> Box<[u8]>
fn finalize_boxed_reset(&mut self) -> Box<[u8]>
Retrieve result into a boxed slice and reset the hasher state. Read more
sourceimpl<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,
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 RtVariableCoreWrapper<T> where
T: VariableOutputCore + HashMarker,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
impl<T> MacMarker for RtVariableCoreWrapper<T> where
T: VariableOutputCore + MacMarker,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
Auto Trait Implementations
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> where
T: Send,
<T as BufferKindUser>::BufferKind: Send,
impl<T> Sync for RtVariableCoreWrapper<T> where
T: Sync,
<T as BufferKindUser>::BufferKind: Sync,
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
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