[][src]Struct ccsds_primary_header::parser::CcsdsParser

pub struct CcsdsParser {
    pub bytes: BytesMut,
    pub allowed_apids: Option<Vec<u16>>,
    pub max_packet_length: Option<u32>,
    pub secondary_header_required: bool,
    pub validation_callback: Option<Box<dyn Fn(&BytesMut) -> bool>>,
}

Fields

bytes: BytesMutallowed_apids: Option<Vec<u16>>max_packet_length: Option<u32>secondary_header_required: boolvalidation_callback: Option<Box<dyn Fn(&BytesMut) -> bool>>

Methods

impl CcsdsParser
[src]

pub fn new() -> Self
[src]

pub fn allow_apid(&mut self, apid: u16)
[src]

pub fn recv_bytes(&mut self, new_bytes: Bytes)
[src]

pub fn recv_slice(&mut self, new_bytes: &[u8])
[src]

pub fn current_header(&self) -> Option<CcsdsPrimaryHeader>
[src]

pub fn current_status(&self) -> CcsdsParserStatus
[src]

pub fn pull_packet(&mut self) -> Option<BytesMut>
[src]

Auto Trait Implementations

impl !Send for CcsdsParser

impl !Sync for CcsdsParser

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

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

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

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

The type returned in the event of a conversion error.

impl<T> BorrowMut for T where
    T: ?Sized
[src]