#[repr(transparent)]pub struct Crc32(pub U32Le);Expand description
32-bit CRC (cyclic redundancy check).
Tuple Fields§
§0: U32LeImplementations§
Source§impl Crc32
impl Crc32
Sourcepub const ALGORITHM: Algorithm<u32> = crc::CRC_32_ISO_HDLC
pub const ALGORITHM: Algorithm<u32> = crc::CRC_32_ISO_HDLC
CRC32 algorithm used for GPT: crc::CRC_32_ISO_HDLC
§Notes
The UEFI Specification is somewhat vague about the CRC algorithm used. Section 4.2 EFI Table Header says: “Unless otherwise specified, UEFI uses a standard CCITT32 CRC algorithm with a seed polynomial value of 0x04c11db7 for its CRC calculations.” There are no further mentions of either “CCITT32” or “04c11db7” in the spec. It’s not clear what if any specification CCITT32 refers to.
The Catalogue of parametrised CRC algorithms, which is the
source of truth for the catalog used by the crc crate, has no
references to CCITT32, but does have several entries that use
the 0x04c11db7 polynomial. Of these, CRC-32/ISO-HDLC appears
to be widely used and recommended by ITU-T, which is the
successor of CCITT.
Trait Implementations§
Source§impl Ord for Crc32
impl Ord for Crc32
Source§impl PartialOrd for Crc32
impl PartialOrd for Crc32
impl Copy for Crc32
impl Eq for Crc32
impl Pod for Crc32
impl StructuralPartialEq for Crc32
Auto Trait Implementations§
impl Freeze for Crc32
impl RefUnwindSafe for Crc32
impl Send for Crc32
impl Sync for Crc32
impl Unpin for Crc32
impl UnwindSafe for Crc32
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
Source§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
Source§type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.Source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
bits
as &Self.