pub struct Parser { /* private fields */ }Expand description
Implementations§
Source§impl Parser
impl Parser
Sourcepub fn push_byte<F>(&mut self, byte: u8, crc_extra_for: &F) -> Option<Frame>
pub fn push_byte<F>(&mut self, byte: u8, crc_extra_for: &F) -> Option<Frame>
Feeds one byte, returning a frame if this byte completes a valid one.
A frame whose checksum fails, or whose message id crc_extra_for does not
recognize, is discarded and the parser resynchronizes on the next start marker.
§Arguments
byte- the next byte from the link.crc_extra_for- resolves a message id to itsCRC_EXTRA, orNoneif unknown.
§Returns
The completed frame, or None if more bytes are needed.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Parser
impl RefUnwindSafe for Parser
impl Send for Parser
impl Sync for Parser
impl Unpin for Parser
impl UnsafeUnpin for Parser
impl UnwindSafe for Parser
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more