[−][src]Struct crc_all::CrcAlgo
Methods
impl CrcAlgo<u8>
[src]
pub fn new(poly: u8, width: usize, init: u8, xorout: u8, reflect: bool) -> Self
[src]
pub fn update_crc(&self, crc: &mut u8, data: &[u8]) -> u8
[src]
pub fn update_bits_crc(&self, crc: &mut u8, bits: u8, offset: usize) -> u8
[src]
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
[src]
pub fn init_crc(&self, crc: &mut u8)
[src]
impl CrcAlgo<u16>
[src]
pub fn new(
poly: u16,
width: usize,
init: u16,
xorout: u16,
reflect: bool
) -> Self
[src]
poly: u16,
width: usize,
init: u16,
xorout: u16,
reflect: bool
) -> Self
pub fn update_crc(&self, crc: &mut u16, data: &[u8]) -> u16
[src]
pub fn update_bits_crc(&self, crc: &mut u16, bits: u8, offset: usize) -> u16
[src]
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
[src]
pub fn init_crc(&self, crc: &mut u16)
[src]
impl CrcAlgo<u32>
[src]
pub fn new(
poly: u32,
width: usize,
init: u32,
xorout: u32,
reflect: bool
) -> Self
[src]
poly: u32,
width: usize,
init: u32,
xorout: u32,
reflect: bool
) -> Self
pub fn update_crc(&self, crc: &mut u32, data: &[u8]) -> u32
[src]
pub fn update_bits_crc(&self, crc: &mut u32, bits: u8, offset: usize) -> u32
[src]
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
[src]
pub fn init_crc(&self, crc: &mut u32)
[src]
impl CrcAlgo<u64>
[src]
pub fn new(
poly: u64,
width: usize,
init: u64,
xorout: u64,
reflect: bool
) -> Self
[src]
poly: u64,
width: usize,
init: u64,
xorout: u64,
reflect: bool
) -> Self
pub fn update_crc(&self, crc: &mut u64, data: &[u8]) -> u64
[src]
pub fn update_bits_crc(&self, crc: &mut u64, bits: u8, offset: usize) -> u64
[src]
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
[src]
pub fn init_crc(&self, crc: &mut u64)
[src]
impl CrcAlgo<u128>
[src]
pub fn new(
poly: u128,
width: usize,
init: u128,
xorout: u128,
reflect: bool
) -> Self
[src]
poly: u128,
width: usize,
init: u128,
xorout: u128,
reflect: bool
) -> Self
pub fn update_crc(&self, crc: &mut u128, data: &[u8]) -> u128
[src]
pub fn update_bits_crc(&self, crc: &mut u128, bits: u8, offset: usize) -> u128
[src]
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
[src]
pub fn init_crc(&self, crc: &mut u128)
[src]
Auto Trait Implementations
impl<T> Unpin for CrcAlgo<T> where
T: Unpin,
T: Unpin,
impl<T> Sync for CrcAlgo<T> where
T: Sync,
T: Sync,
impl<T> Send for CrcAlgo<T> where
T: Send,
T: Send,
Blanket Implementations
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,