pub struct FrameHeader {
pub msg_length: u16,
pub crc16: u16,
}Expand description
Wraps a complete RPC (Header + data) on stream transports, like a UART.
Fields§
§msg_length: u16§crc16: u16Implementations§
Source§impl FrameHeader
impl FrameHeader
Sourcepub fn new_from_msg(msg: &[u8]) -> Self
pub fn new_from_msg(msg: &[u8]) -> Self
Builds a frame header which will wrap the provided msg.
Sourcepub fn parse<I, E: ParseError<I>>(i: I) -> IResult<I, Self, E>
pub fn parse<I, E: ParseError<I>>(i: I) -> IResult<I, Self, E>
Nom parser which decodes a leading FrameHeader from the input. Can be chained with other nom parsers.
Trait Implementations§
Source§impl Clone for FrameHeader
impl Clone for FrameHeader
Source§fn clone(&self) -> FrameHeader
fn clone(&self) -> FrameHeader
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for FrameHeader
impl RefUnwindSafe for FrameHeader
impl Send for FrameHeader
impl Sync for FrameHeader
impl Unpin for FrameHeader
impl UnwindSafe for FrameHeader
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