pub struct RawMessage<'a> {
pub msgid: u32,
pub crc_extra: u8,
pub payload: &'a [u8],
}Expand description
A message this crate does not type, carried by id and raw payload.
This is the escape hatch for a message id outside the typed set or from another
dialect: supply its id, payload, and CRC_EXTRA and it frames and checks like any
other, the way Modbus carries a function code it does not name.
Fields§
§msgid: u32The message id.
crc_extra: u8The CRC_EXTRA seed for the message id.
payload: &'a [u8]The raw payload bytes.
Implementations§
Source§impl<'a> RawMessage<'a>
impl<'a> RawMessage<'a>
Trait Implementations§
Source§impl<'a> Clone for RawMessage<'a>
impl<'a> Clone for RawMessage<'a>
Source§fn clone(&self) -> RawMessage<'a>
fn clone(&self) -> RawMessage<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'a> Copy for RawMessage<'a>
Source§impl<'a> Debug for RawMessage<'a>
impl<'a> Debug for RawMessage<'a>
impl<'a> Eq for RawMessage<'a>
Source§impl<'a> PartialEq for RawMessage<'a>
impl<'a> PartialEq for RawMessage<'a>
Source§fn eq(&self, other: &RawMessage<'a>) -> bool
fn eq(&self, other: &RawMessage<'a>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<'a> StructuralPartialEq for RawMessage<'a>
Auto Trait Implementations§
impl<'a> Freeze for RawMessage<'a>
impl<'a> RefUnwindSafe for RawMessage<'a>
impl<'a> Send for RawMessage<'a>
impl<'a> Sync for RawMessage<'a>
impl<'a> Unpin for RawMessage<'a>
impl<'a> UnsafeUnpin for RawMessage<'a>
impl<'a> UnwindSafe for RawMessage<'a>
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