pub enum ChecksumKind {
None,
Crc32c,
Crc64,
Md5,
}Expand description
Spec §9.4.2.15.2 — selection of the messageChecksum variant. The value
is in the C bits (5+6) of the flag byte.
Variants§
None
C = 00 — no checksum.
Crc32c
C = 01 — CRC-32C (RFC 4960 App. B), 4 Byte.
Crc64
C = 10 — CRC-64-XZ (ECMA-182, XZ utils), 8 Byte.
Md5
C = 11 — MD5-128 (RFC 1321), 16 Byte.
Implementations§
Source§impl ChecksumKind
impl ChecksumKind
Sourcepub fn from_flags(flags: u8) -> Self
pub fn from_flags(flags: u8) -> Self
Extract from the C bits of a flag byte.
Sourcepub fn to_flag_bits(self) -> u8
pub fn to_flag_bits(self) -> u8
Encode into the C bits of a flag byte.
Trait Implementations§
Source§impl Clone for ChecksumKind
impl Clone for ChecksumKind
Source§fn clone(&self) -> ChecksumKind
fn clone(&self) -> ChecksumKind
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ChecksumKind
Source§impl Debug for ChecksumKind
impl Debug for ChecksumKind
impl Eq for ChecksumKind
Source§impl PartialEq for ChecksumKind
impl PartialEq for ChecksumKind
impl StructuralPartialEq for ChecksumKind
Auto Trait Implementations§
impl Freeze for ChecksumKind
impl RefUnwindSafe for ChecksumKind
impl Send for ChecksumKind
impl Sync for ChecksumKind
impl Unpin for ChecksumKind
impl UnsafeUnpin for ChecksumKind
impl UnwindSafe for ChecksumKind
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