#[non_exhaustive]pub enum ClientPacket {
Link1,
Link2 {
callsign: Callsign,
},
Unlink,
Poll,
VoiceHeader {
stream_id: StreamId,
header: DStarHeader,
},
VoiceData {
stream_id: StreamId,
seq: u8,
frame: VoiceFrame,
},
VoiceEot {
stream_id: StreamId,
seq: u8,
},
}Expand description
Packets the client sends (and the server receives).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Link1
5-byte LINK1 connect request [0x05, 0x00, 0x18, 0x00, 0x01].
Link2
28-byte LINK2 login with callsign at [4..] and b"DV019999" at [20..28].
Unlink
5-byte unlink [0x05, 0x00, 0x18, 0x00, 0x00].
Poll
3-byte keepalive poll [0x03, 0x60, 0x00].
VoiceHeader
58-byte voice header (DSVT framed).
Fields
§
header: DStarHeaderDecoded D-STAR header (lenient — bytes preserved verbatim).
VoiceData
29-byte voice data (DSVT framed).
Fields
§
frame: VoiceFrame9 AMBE bytes + 3 slow data bytes.
VoiceEot
32-byte voice EOT (DSVT framed, AMBE silence + END_PATTERN).
Trait Implementations§
Source§impl Clone for ClientPacket
impl Clone for ClientPacket
Source§fn clone(&self) -> ClientPacket
fn clone(&self) -> ClientPacket
Returns a duplicate 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 Debug for ClientPacket
impl Debug for ClientPacket
Source§impl PartialEq for ClientPacket
impl PartialEq for ClientPacket
impl Eq for ClientPacket
impl StructuralPartialEq for ClientPacket
Auto Trait Implementations§
impl Freeze for ClientPacket
impl RefUnwindSafe for ClientPacket
impl Send for ClientPacket
impl Sync for ClientPacket
impl Unpin for ClientPacket
impl UnwindSafe for ClientPacket
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