Struct resol_vbus::PacketFieldId
source · 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<PacketFieldId<'a>> for PacketFieldId<'a>
impl<'a> PartialEq<PacketFieldId<'a>> for PacketFieldId<'a>
source§fn eq(&self, other: &PacketFieldId<'a>) -> bool
fn eq(&self, other: &PacketFieldId<'a>) -> bool
source§impl<'a> ToPacketFieldId for PacketFieldId<'a>
impl<'a> ToPacketFieldId for PacketFieldId<'a>
source§fn to_packet_field_id(&self) -> Result<PacketFieldId<'_>>
fn to_packet_field_id(&self) -> Result<PacketFieldId<'_>>
Get the
PacketFieldId
for a given value.