pub enum PacketKind {
PushData,
PushAck,
PullData,
PullResp,
PullAck,
TxAck,
}Expand description
Which kind of datagram, as its fourth byte says.
Variants§
PushData
0x00, the gateway forwarding what it heard.
PushAck
0x01, the server acknowledging a PUSH_DATA.
PullData
0x02, the gateway holding its route open.
PullResp
0x03, the server sending a packet to transmit.
PullAck
0x04, the server acknowledging a PULL_DATA.
TxAck
0x05, the gateway reporting what became of a PULL_RESP.
Implementations§
Source§impl PacketKind
impl PacketKind
Sourcepub const fn identifier(self) -> u8
pub const fn identifier(self) -> u8
Sourcepub const fn from_identifier(identifier: u8) -> Option<PacketKind>
pub const fn from_identifier(identifier: u8) -> Option<PacketKind>
Sourcepub const fn carries_gateway(self) -> bool
pub const fn carries_gateway(self) -> bool
Reports whether this kind carries the gateway’s identifier.
§Returns
true for PUSH_DATA, PULL_DATA, and TX_ACK.
Trait Implementations§
Source§impl Clone for PacketKind
impl Clone for PacketKind
Source§fn clone(&self) -> PacketKind
fn clone(&self) -> PacketKind
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for PacketKind
Source§impl Debug for PacketKind
impl Debug for PacketKind
impl Eq for PacketKind
Source§impl Hash for PacketKind
impl Hash for PacketKind
Source§impl PartialEq for PacketKind
impl PartialEq for PacketKind
Source§fn eq(&self, other: &PacketKind) -> bool
fn eq(&self, other: &PacketKind) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for PacketKind
Auto Trait Implementations§
impl Freeze for PacketKind
impl RefUnwindSafe for PacketKind
impl Send for PacketKind
impl Sync for PacketKind
impl Unpin for PacketKind
impl UnsafeUnpin for PacketKind
impl UnwindSafe for PacketKind
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