pub struct Crc32c(/* private fields */);Expand description
A CRC-32C (Castagnoli) taken over bytes given a piece at a time: the
reflected polynomial 0x82F63B78, starting from all ones and ending
with them flipped, so crc32c(b"123456789") is 0xE3069283.
Implementations§
Source§impl Crc32c
impl Crc32c
Sourcepub fn update(&mut self, bytes: &[u8]) -> &mut Self
pub fn update(&mut self, bytes: &[u8]) -> &mut Self
Takes bytes in, after every byte given before.
Sourcepub fn raw() -> Self
pub fn raw() -> Self
A check taken from nothing: the register at zero, not all ones. The
register is linear in the bytes, so the register of a then b is
Crc32c::zeros of a’s by b’s length, exclusive-or’d with
b’s from nothing (Crc32c::xor). That gives the check over any
range from two prefixes, with no byte read twice.
Trait Implementations§
impl Copy for Crc32c
impl Eq for Crc32c
impl StructuralPartialEq for Crc32c
Auto Trait Implementations§
impl Forget for Crc32c
impl Freeze for Crc32c
impl Move for Crc32c
impl RefUnwindSafe for Crc32c
impl Send for Crc32c
impl Sync for Crc32c
impl Unpin for Crc32c
impl UnsafeUnpin for Crc32c
impl UnwindSafe for Crc32c
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