pub struct MessageId(/* private fields */);Expand description
Newtype for a message ID. The Message ID is a 32-bit identifier that is unique for each message. It encodes both the service ID and the method ID. Message IDs are assumed to be unique for an entire vehicle network.
Implementations§
Source§impl MessageId
impl MessageId
Sourcepub const fn new_from_service_and_method(
service_id: u16,
method_id: u16,
) -> Self
pub const fn new_from_service_and_method( service_id: u16, method_id: u16, ) -> Self
Create a new MessageId from service and method IDs.
Sourcepub const fn message_id(&self) -> u32
pub const fn message_id(&self) -> u32
Get the message ID
Sourcepub const fn set_message_id(&mut self, message_id: u32)
pub const fn set_message_id(&mut self, message_id: u32)
Set the message ID
Sourcepub const fn service_id(&self) -> u16
pub const fn service_id(&self) -> u16
Get the service ID
Sourcepub const fn set_service_id(&mut self, service_id: u16)
pub const fn set_service_id(&mut self, service_id: u16)
Set the service ID
Sourcepub const fn set_method_id(&mut self, method_id: u16)
pub const fn set_method_id(&mut self, method_id: u16)
Set the method ID
Trait Implementations§
impl Copy for MessageId
impl Eq for MessageId
impl StructuralPartialEq for MessageId
Auto Trait Implementations§
impl Freeze for MessageId
impl RefUnwindSafe for MessageId
impl Send for MessageId
impl Sync for MessageId
impl Unpin for MessageId
impl UnsafeUnpin for MessageId
impl UnwindSafe for MessageId
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