Trait Header

Source
pub trait Header {
    // Required methods
    fn new() -> Self;
    fn size() -> usize;
    fn set(&mut self, buf: &[u8]) -> Result<(), TryFromSliceError>;
    fn set_valid(&mut self);
    fn set_invalid(&mut self);
    fn is_valid(&self) -> bool;
    fn to_bitvec(&self) -> BitVec<u8, Msb0>;
}
Expand description

A fixed length header trait.

Required Methods§

Source

fn new() -> Self

Source

fn size() -> usize

Source

fn set(&mut self, buf: &[u8]) -> Result<(), TryFromSliceError>

Source

fn set_valid(&mut self)

Source

fn set_invalid(&mut self)

Source

fn is_valid(&self) -> bool

Source

fn to_bitvec(&self) -> BitVec<u8, Msb0>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§