[][src]Trait bp7::bundle::Block

pub trait Block: Clone {
    fn has_crc(&self) -> bool;
fn set_crc_type(&mut self, crc_type: CRCType);
fn crc_type(&self) -> CRCType;
fn crc(&self) -> &[u8];
fn set_crc(&mut self, crc: ByteBuffer);
fn to_cbor(&self) -> ByteBuffer; fn calculate_crc(&mut self) { ... }
fn check_crc(&self) -> bool { ... }
fn reset_crc(&mut self) { ... } }

Required methods

fn has_crc(&self) -> bool

Convert block struct to a serializable enum

fn set_crc_type(&mut self, crc_type: CRCType)

fn crc_type(&self) -> CRCType

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

fn set_crc(&mut self, crc: ByteBuffer)

fn to_cbor(&self) -> ByteBuffer

Loading content...

Provided methods

fn calculate_crc(&mut self)

fn check_crc(&self) -> bool

fn reset_crc(&mut self)

Reset crc field to an empty value

Loading content...

Implementors

impl Block for CanonicalBlock[src]

fn calculate_crc(&mut self)[src]

fn check_crc(&self) -> bool[src]

fn reset_crc(&mut self)[src]

impl Block for PrimaryBlock[src]

fn calculate_crc(&mut self)[src]

fn check_crc(&self) -> bool[src]

fn reset_crc(&mut self)[src]

Loading content...