pub struct Fletcher<T>where
T: FletcherAccumulator,{ /* private fields */ }
Expand description
Type to hold the state for calculating a fletcher checksum.
This is useful if you want to calculate the checksum over several small
chunks of data. If you have an entire block of data the functions
calc_fletcher16
, calc_fletcher32
, calc_fletcher64
simplify
the process.
Implementations§
Source§impl<T> Fletcher<T>where
T: FletcherAccumulator,
impl<T> Fletcher<T>where
T: FletcherAccumulator,
Sourcepub fn with_initial_values(
a: <T as FletcherAccumulator>::InputType,
b: <T as FletcherAccumulator>::InputType,
) -> Fletcher<T>
pub fn with_initial_values( a: <T as FletcherAccumulator>::InputType, b: <T as FletcherAccumulator>::InputType, ) -> Fletcher<T>
Construct a new checksum object with a specific set of initial values
Sourcepub fn update(&mut self, data: &[<T as FletcherAccumulator>::InputType])
pub fn update(&mut self, data: &[<T as FletcherAccumulator>::InputType])
Updates the checksum with the given input data
Trait Implementations§
Source§impl<T> Default for Fletcher<T>where
T: FletcherAccumulator,
impl<T> Default for Fletcher<T>where
T: FletcherAccumulator,
impl<T> Copy for Fletcher<T>where
T: FletcherAccumulator + Copy,
Auto Trait Implementations§
impl<T> Freeze for Fletcher<T>where
T: Freeze,
impl<T> RefUnwindSafe for Fletcher<T>where
T: RefUnwindSafe,
impl<T> Send for Fletcher<T>where
T: Send,
impl<T> Sync for Fletcher<T>where
T: Sync,
impl<T> Unpin for Fletcher<T>where
T: Unpin,
impl<T> UnwindSafe for Fletcher<T>where
T: 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