Struct can_type_rs::j1939::Message
source · pub struct Message { /* private fields */ }Implementations§
source§impl Message
impl Message
sourcepub fn from_parts(id: Id, pdu: Pdu) -> Option<Self>
pub fn from_parts(id: Id, pdu: Pdu) -> Option<Self>
Constructs a new Message from its parts: a 29-bit J1939 identifier and pdu containing 64 bits of generic data.
§Arguments
id: AnIdrepresenting the 29-bit identifier of the message.pdu: APducontaining the payload or content of the message.
§Returns
A new Message instance initialized with the provided parts.
sourcepub fn into_parts(self) -> (Id, Pdu)
pub fn into_parts(self) -> (Id, Pdu)
sourcepub fn try_from_bits(
hex_id: u32,
hex_pdu: u64,
pdu_type: PduType,
) -> Option<Self>
pub fn try_from_bits( hex_id: u32, hex_pdu: u64, pdu_type: PduType, ) -> Option<Self>
Constructs a new Message from raw bit representations of its components.
sourcepub fn try_from_hex(
hex_id: &str,
hex_pdu: &str,
pdu_type: PduType,
) -> Option<Self>
pub fn try_from_hex( hex_id: &str, hex_pdu: &str, pdu_type: PduType, ) -> Option<Self>
Constructs a new Message from hexadecimal string representations of its components.
sourcepub fn from_hex(hex_id: &str, hex_pdu: &str, pdu_type: PduType) -> Self
pub fn from_hex(hex_id: &str, hex_pdu: &str, pdu_type: PduType) -> Self
Constructs a new Message from hexadecimal string representations of its components.
§Arguments
hex_id: A&strrepresenting the hexadecimal encoded 29-bit J1939 identifier.hex_pdu: A&strrepresenting the hexadecimal encoded pdu.
§Returns
A new Message instance initialized with the decoded components.
Trait Implementations§
source§impl Ord for Message
impl Ord for Message
source§impl PartialOrd for Message
impl PartialOrd for Message
impl Copy for Message
impl Eq for Message
impl StructuralPartialEq for Message
Auto Trait Implementations§
impl Freeze for Message
impl RefUnwindSafe for Message
impl Send for Message
impl Sync for Message
impl Unpin for Message
impl UnwindSafe for Message
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)