pub struct CrcAlgo<T> { /* private fields */ }
Implementations
sourceimpl CrcAlgo<u8>
impl CrcAlgo<u8>
pub const fn new(
poly: u8,
width: usize,
init: u8,
xorout: u8,
reflect: bool
) -> Self
pub fn update_crc(&self, crc: &mut u8, data: &[u8]) -> u8
sourcepub fn update_bits_crc(&self, crc: &mut u8, bits: u8, offset: usize) -> u8
pub fn update_bits_crc(&self, crc: &mut u8, bits: u8, offset: usize) -> u8
The bits 0b01010000
with offset 3
means 0b01010
.
Panics
Panics if self.reflect
is true
or offset >= 8
.
pub fn finish_crc(&self, crc: &u8) -> u8
pub fn init_crc(&self, crc: &mut u8)
sourceimpl CrcAlgo<u16>
impl CrcAlgo<u16>
pub const fn new(
poly: u16,
width: usize,
init: u16,
xorout: u16,
reflect: bool
) -> Self
pub fn update_crc(&self, crc: &mut u16, data: &[u8]) -> u16
sourcepub fn update_bits_crc(&self, crc: &mut u16, bits: u8, offset: usize) -> u16
pub fn update_bits_crc(&self, crc: &mut u16, bits: u8, offset: usize) -> u16
The bits 0b01010000
with offset 3
means 0b01010
.
Panics
Panics if self.reflect
is true
or offset >= 8
.
pub fn finish_crc(&self, crc: &u16) -> u16
pub fn init_crc(&self, crc: &mut u16)
sourceimpl CrcAlgo<u32>
impl CrcAlgo<u32>
pub const fn new(
poly: u32,
width: usize,
init: u32,
xorout: u32,
reflect: bool
) -> Self
pub fn update_crc(&self, crc: &mut u32, data: &[u8]) -> u32
sourcepub fn update_bits_crc(&self, crc: &mut u32, bits: u8, offset: usize) -> u32
pub fn update_bits_crc(&self, crc: &mut u32, bits: u8, offset: usize) -> u32
The bits 0b01010000
with offset 3
means 0b01010
.
Panics
Panics if self.reflect
is true
or offset >= 8
.
pub fn finish_crc(&self, crc: &u32) -> u32
pub fn init_crc(&self, crc: &mut u32)
sourceimpl CrcAlgo<u64>
impl CrcAlgo<u64>
pub const fn new(
poly: u64,
width: usize,
init: u64,
xorout: u64,
reflect: bool
) -> Self
pub fn update_crc(&self, crc: &mut u64, data: &[u8]) -> u64
sourcepub fn update_bits_crc(&self, crc: &mut u64, bits: u8, offset: usize) -> u64
pub fn update_bits_crc(&self, crc: &mut u64, bits: u8, offset: usize) -> u64
The bits 0b01010000
with offset 3
means 0b01010
.
Panics
Panics if self.reflect
is true
or offset >= 8
.
pub fn finish_crc(&self, crc: &u64) -> u64
pub fn init_crc(&self, crc: &mut u64)
sourceimpl CrcAlgo<u128>
impl CrcAlgo<u128>
pub const fn new(
poly: u128,
width: usize,
init: u128,
xorout: u128,
reflect: bool
) -> Self
pub fn update_crc(&self, crc: &mut u128, data: &[u8]) -> u128
sourcepub fn update_bits_crc(&self, crc: &mut u128, bits: u8, offset: usize) -> u128
pub fn update_bits_crc(&self, crc: &mut u128, bits: u8, offset: usize) -> u128
The bits 0b01010000
with offset 3
means 0b01010
.
Panics
Panics if self.reflect
is true
or offset >= 8
.
pub fn finish_crc(&self, crc: &u128) -> u128
pub fn init_crc(&self, crc: &mut u128)
Auto Trait Implementations
impl<T> RefUnwindSafe for CrcAlgo<T> where
T: RefUnwindSafe,
impl<T> Send for CrcAlgo<T> where
T: Send,
impl<T> Sync for CrcAlgo<T> where
T: Sync,
impl<T> Unpin for CrcAlgo<T> where
T: Unpin,
impl<T> UnwindSafe for CrcAlgo<T> where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more