Struct crc16::State [] [src]

pub struct State<T> { /* fields omitted */ }

State of crc calculation.

Methods

impl<T: CrcType> State<T>
[src]

[src]

Creates new state of given CRC type.

use crc16::*;

let state = State::<ARC>::new();

[src]

Updates state with new data.

[src]

Returns CRC value of state.

[src]

Calculates CRC value of given type for given message.

use crc16::*;

assert_eq!(State::<ARC>::calculate(b"123456789"), 0xBB3D);

Trait Implementations

impl<T: Copy> Copy for State<T>
[src]

impl<T: Clone> Clone for State<T>
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<T: PartialEq> PartialEq for State<T>
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl<T: Eq> Eq for State<T>
[src]

impl<T: CrcType> Hasher for State<T>
[src]

[src]

Returns the hash value for the values written so far. Read more

[src]

Writes some data into this Hasher. Read more

1.3.0
[src]

Writes a single u8 into this hasher.

1.3.0
[src]

Writes a single u16 into this hasher.

1.3.0
[src]

Writes a single u32 into this hasher.

1.3.0
[src]

Writes a single u64 into this hasher.

[src]

🔬 This is a nightly-only experimental API. (i128)

Writes a single u128 into this hasher.

1.3.0
[src]

Writes a single usize into this hasher.

1.3.0
[src]

Writes a single i8 into this hasher.

1.3.0
[src]

Writes a single i16 into this hasher.

1.3.0
[src]

Writes a single i32 into this hasher.

1.3.0
[src]

Writes a single i64 into this hasher.

[src]

🔬 This is a nightly-only experimental API. (i128)

Writes a single i128 into this hasher.

1.3.0
[src]

Writes a single isize into this hasher.

impl<T: CrcType> Default for State<T>
[src]

[src]

Returns the "default value" for a type. Read more