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

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

Required methods

fn to_variant(&self) -> BlockVariants

Convert block struct to a serializable enum

fn has_crc(&self) -> bool

fn set_crc_type(&mut self, crc_type: CRCType)

fn crc_type(&self) -> CRCType

fn crc(&self) -> ByteBuffer

fn set_crc(&mut self, crc: 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

fn to_cbor(&self) -> ByteBuffer

Convert block to a cbor encoded byte vector

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]

fn to_cbor(&self) -> ByteBuffer[src]

impl Block for PrimaryBlock[src]

fn calculate_crc(&mut self)[src]

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

fn reset_crc(&mut self)[src]

fn to_cbor(&self) -> ByteBuffer[src]

Loading content...