pub struct PacketFieldId<'a>(pub PacketId, pub &'a str);
Expand description
A tuple of identification information about a field in a Packet
value.
It consists of the following parts:
- the packet ID tuple (channel, destination address, source address and command)
- the field ID
Tuple Fields§
§0: PacketId
§1: &'a str
Implementations§
Source§impl<'a> PacketFieldId<'a>
impl<'a> PacketFieldId<'a>
Sourcepub fn packet_id_string(&self) -> String
pub fn packet_id_string(&self) -> String
Get the packet ID string for a given PacketFieldId
value.
§Examples
use resol_vbus::{PacketId, PacketFieldId};
let packet_field_id = PacketFieldId(PacketId(0x11, 0x1213, 0x1415, 0x1718), "012_4_0");
assert_eq!("11_1213_1415_10_1718", packet_field_id.packet_id_string());
Sourcepub fn packet_field_id_string(&self) -> String
pub fn packet_field_id_string(&self) -> String
Get the packet field ID string for a given PacketFieldId
value.
§Examples
use resol_vbus::{PacketId, PacketFieldId};
let packet_field_id = PacketFieldId(PacketId(0x11, 0x1213, 0x1415, 0x1718), "012_4_0");
assert_eq!("11_1213_1415_10_1718_012_4_0", packet_field_id.packet_field_id_string());
Trait Implementations§
Source§impl<'a> Clone for PacketFieldId<'a>
impl<'a> Clone for PacketFieldId<'a>
Source§fn clone(&self) -> PacketFieldId<'a>
fn clone(&self) -> PacketFieldId<'a>
Returns a copy 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 moreSource§impl<'a> Debug for PacketFieldId<'a>
impl<'a> Debug for PacketFieldId<'a>
Source§impl<'a> Hash for PacketFieldId<'a>
impl<'a> Hash for PacketFieldId<'a>
Source§impl<'a> PartialEq for PacketFieldId<'a>
impl<'a> PartialEq for PacketFieldId<'a>
Source§impl<'a> ToPacketFieldId for PacketFieldId<'a>
impl<'a> ToPacketFieldId for PacketFieldId<'a>
Source§fn to_packet_field_id(&self) -> Result<PacketFieldId<'_>, Error>
fn to_packet_field_id(&self) -> Result<PacketFieldId<'_>, Error>
Get the
PacketFieldId
for a given value.impl<'a> Copy for PacketFieldId<'a>
impl<'a> Eq for PacketFieldId<'a>
impl<'a> StructuralPartialEq for PacketFieldId<'a>
Auto Trait Implementations§
impl<'a> Freeze for PacketFieldId<'a>
impl<'a> RefUnwindSafe for PacketFieldId<'a>
impl<'a> Send for PacketFieldId<'a>
impl<'a> Sync for PacketFieldId<'a>
impl<'a> Unpin for PacketFieldId<'a>
impl<'a> UnwindSafe for PacketFieldId<'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