Struct Crc
pub struct Crc { /* private fields */ }
The CRC calculated by a CrcReader.
Implementations
impl Crc
fn new() -> SelfCreate a new CRC.
fn sum(&self) -> u32Returns the current crc32 checksum.
fn amount(&self) -> u32The number of bytes that have been used to calculate the CRC. This value is only accurate if the amount is lower than 232.
fn update(&mut self, data: &[u8])Update the CRC with the bytes in
data.fn reset(&mut self)Reset the CRC, to start a new hash.
Do this in favor of creating a new
Crcinstance.fn combine(&mut self, additional_crc: &Self)Combine the CRC with the CRC for the subsequent block of bytes.
Trait Implementations
impl Debug for Crc
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Default for Crc
fn default() -> Self