Struct Engine
pub struct Engine<Ck>where
Ck: Checksum,{ /* private fields */ }
Expand description
A checksum engine, which can be used to compute or verify a checksum.
Use this to verify a checksum, feed it the data to be checksummed using
the Self::input_*
methods.
Implementations§
§impl<Ck> Engine<Ck>where
Ck: Checksum,
impl<Ck> Engine<Ck>where
Ck: Checksum,
pub fn input_fe(&mut self, e: Fe32)
pub fn input_fe(&mut self, e: Fe32)
Adds a single gf32 element to the checksum engine.
This is where the actual checksum computation magic happens.
pub fn input_target_residue(&mut self)
pub fn input_target_residue(&mut self)
Inputs the target residue of the checksum.
Checksums are generated by appending the target residue to the input string, then computing the actual residue, and then replacing the target with the actual. This method lets us compute the actual residue without doing any string concatenations.
pub fn residue(&self) -> &<Ck as Checksum>::MidstateRepr
pub fn residue(&self) -> &<Ck as Checksum>::MidstateRepr
Returns for the current checksum residue.
Trait Implementations§
impl<Ck> Copy for Engine<Ck>
impl<Ck> Eq for Engine<Ck>
impl<Ck> StructuralPartialEq for Engine<Ck>where
Ck: Checksum,
Auto Trait Implementations§
impl<Ck> Freeze for Engine<Ck>
impl<Ck> Send for Engine<Ck>
impl<Ck> Sync for Engine<Ck>
impl<Ck> RefUnwindSafe for Engine<Ck>
impl<Ck> Unpin for Engine<Ck>
impl<Ck> UnwindSafe for Engine<Ck>
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
§impl<T> AnySync for T
impl<T> AnySync for T
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request