Struct crc::Crc[][src]

pub struct Crc<W: Width> {
    pub algorithm: &'static Algorithm<W>,
    // some fields omitted
}

Fields

algorithm: &'static Algorithm<W>

Implementations

impl Crc<u16>[src]

pub const fn new(algorithm: &'static Algorithm<u16>) -> Self[src]

pub const fn checksum(&self, bytes: &[u8]) -> u16[src]

pub const fn digest(&self) -> Digest<'_, u16>[src]

impl Crc<u32>[src]

pub const fn new(algorithm: &'static Algorithm<u32>) -> Self[src]

pub const fn checksum(&self, bytes: &[u8]) -> u32[src]

pub const fn digest(&self) -> Digest<'_, u32>[src]

impl Crc<u64>[src]

pub const fn new(algorithm: &'static Algorithm<u64>) -> Self[src]

pub const fn checksum(&self, bytes: &[u8]) -> u64[src]

pub const fn digest(&self) -> Digest<'_, u64>[src]

Auto Trait Implementations

impl<W> Send for Crc<W> where
    W: Send + Sync

impl<W> Sync for Crc<W> where
    W: Sync

impl<W> Unpin for Crc<W> where
    W: Unpin

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.