pub enum RawPacket {
Ctrl {
header: CtrlHeader,
payload: Vec<u8>,
},
SimpleData {
header: DataHeader,
payload: Vec<u8>,
},
Data {
header: DataHeader,
logical_packets: Vec<LogicalPacket>,
},
}Variants§
Implementations§
Source§impl RawPacket
impl RawPacket
pub fn id(&self) -> u8
pub fn packet_type(&self) -> PacketType
Sourcepub fn get_attribute(&self) -> Option<Attribute>
pub fn get_attribute(&self) -> Option<Attribute>
Get the attribute for control packets
Sourcepub fn get_attribute_set(&self) -> Option<AttributeSet>
pub fn get_attribute_set(&self) -> Option<AttributeSet>
Get the attribute set for control packets (for GetData requests)
Sourcepub fn logical_packets(&self) -> Option<&[LogicalPacket]>
pub fn logical_packets(&self) -> Option<&[LogicalPacket]>
Get logical packets for Data variant
Sourcepub fn validate_correlation(
&self,
request_set: AttributeSet,
) -> Result<(), KMError>
pub fn validate_correlation( &self, request_set: AttributeSet, ) -> Result<(), KMError>
Validate that response attributes match the request mask
Returns Ok(()) if all response attributes were requested in the mask, or Err if there’s a mismatch.
Sourcepub fn is_empty_response(&self) -> bool
pub fn is_empty_response(&self) -> bool
Check if this is an empty PutData response (no logical packets)
Trait Implementations§
impl StructuralPartialEq for RawPacket
Auto Trait Implementations§
impl Freeze for RawPacket
impl RefUnwindSafe for RawPacket
impl Send for RawPacket
impl Sync for RawPacket
impl Unpin for RawPacket
impl UnsafeUnpin for RawPacket
impl UnwindSafe for RawPacket
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