[][src]Trait bp7::crc::CrcBlock

pub trait CrcBlock: Block + Clone {
    fn crc_value(&self) -> &CrcValue;
fn set_crc(&mut self, crc: CrcValue); fn has_crc(&self) -> bool { ... }
fn update_crc(&mut self) { ... }
fn check_crc(&mut self) -> bool { ... }
fn reset_crc(&mut self) { ... }
fn crc(&self) -> Option<&[u8]> { ... }
fn set_crc_type(&mut self, crc_value: CRCType) { ... }
fn crc_type(&self) -> CRCType { ... } }

Required methods

fn crc_value(&self) -> &CrcValue

fn set_crc(&mut self, crc: CrcValue)

Loading content...

Provided methods

fn has_crc(&self) -> bool

Convert block struct to a serializable enum

fn update_crc(&mut self)

Recalculate crc value

fn check_crc(&mut self) -> bool

Check if crc value is valid

fn reset_crc(&mut self)

Reset crc field to an empty value

fn crc(&self) -> Option<&[u8]>

Returns raw crc checksum

fn set_crc_type(&mut self, crc_value: CRCType)

Set crc type CRC_NO, CRC_16, CRC_32

fn crc_type(&self) -> CRCType

Return the crc type code

Loading content...

Implementors

impl CrcBlock for CanonicalBlock[src]

impl CrcBlock for PrimaryBlock[src]

Loading content...