pub struct Message<P: IsProtocol, U: IsDataUnit> { /* private fields */ }
Expand description
Implementations§
Source§impl Message<J1939, Data>
impl Message<J1939, Data>
Sourcepub fn from_parts(id: Id<J1939>, pdu: Pdu<Data>) -> Self
pub fn from_parts(id: Id<J1939>, pdu: Pdu<Data>) -> Self
Constructs a new Message from its parts: a 29-bit J1939 identifier and pdu containing 64 bits of generic data.
§Arguments
id
: AnId<J1939>
representing the 29-bit identifier of the message.pdu
: APdu<Data>
containing the payload or content of the message.
§Returns
A new Message
instance initialized with the provided parts.
Sourcepub fn from_hex(hex_id: &str, hex_pdu: &str) -> Self
pub fn from_hex(hex_id: &str, hex_pdu: &str) -> Self
Constructs a new Message
from hexadecimal string representations of its components.
§Arguments
hex_id
: A&str
representing the hexadecimal encoded 29-bit J1939 identifier.hex_pdu
: A&str
representing the hexadecimal encoded pdu.
§Returns
A new Message
instance initialized with the decoded components.
Source§impl Message<J1939, Name>
impl Message<J1939, Name>
Trait Implementations§
Source§impl<P: Clone + IsProtocol, U: Clone + IsDataUnit> Clone for Message<P, U>
impl<P: Clone + IsProtocol, U: Clone + IsDataUnit> Clone for Message<P, U>
Source§impl<P: Debug + IsProtocol, U: Debug + IsDataUnit> Debug for Message<P, U>
impl<P: Debug + IsProtocol, U: Debug + IsDataUnit> Debug for Message<P, U>
Source§impl<P: Ord + IsProtocol, U: Ord + IsDataUnit> Ord for Message<P, U>
impl<P: Ord + IsProtocol, U: Ord + IsDataUnit> Ord for Message<P, U>
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<P: PartialEq + IsProtocol, U: PartialEq + IsDataUnit> PartialEq for Message<P, U>
impl<P: PartialEq + IsProtocol, U: PartialEq + IsDataUnit> PartialEq for Message<P, U>
Source§impl<P: PartialOrd + IsProtocol, U: PartialOrd + IsDataUnit> PartialOrd for Message<P, U>
impl<P: PartialOrd + IsProtocol, U: PartialOrd + IsDataUnit> PartialOrd for Message<P, U>
impl<P: Copy + IsProtocol, U: Copy + IsDataUnit> Copy for Message<P, U>
impl<P: Eq + IsProtocol, U: Eq + IsDataUnit> Eq for Message<P, U>
impl<P: IsProtocol, U: IsDataUnit> StructuralPartialEq for Message<P, U>
Auto Trait Implementations§
impl<P, U> Freeze for Message<P, U>
impl<P, U> RefUnwindSafe for Message<P, U>where
P: RefUnwindSafe,
U: RefUnwindSafe,
impl<P, U> Send for Message<P, U>
impl<P, U> Sync for Message<P, U>
impl<P, U> Unpin for Message<P, U>
impl<P, U> UnwindSafe for Message<P, U>where
P: UnwindSafe,
U: UnwindSafe,
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