#[non_exhaustive]pub enum Event<P: Protocol> {
Connected {
peer: SocketAddr,
},
Disconnected {
reason: DisconnectReason,
},
PollEcho {
peer: SocketAddr,
},
VoiceStart {
stream_id: StreamId,
header: DStarHeader,
diagnostics: Vec<Diagnostic>,
},
VoiceFrame {
stream_id: StreamId,
seq: u8,
frame: VoiceFrame,
},
VoiceEnd {
stream_id: StreamId,
reason: VoiceEndReason,
},
}Expand description
One event surfaced by the client session machine.
The P: Protocol parameter is a phantom — every variant carries
the same data regardless of protocol. The phantom is for
compile-time discrimination only, confined to a hidden
Event::__Phantom variant that cannot be constructed (its
payload is an uninhabited Infallible).
All variants are populated: Event::Connected, Event::Disconnected,
Event::PollEcho, and the voice events.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Connected
Session has transitioned to Connected.
Fields
peer: SocketAddrPeer address of the reflector.
Disconnected
Session has transitioned to Disconnected.
Fields
reason: DisconnectReasonWhy the session disconnected.
PollEcho
Reflector keepalive echo received.
Fields
peer: SocketAddrPeer that sent the echo.
VoiceStart
A new voice stream started.
Fields
header: DStarHeaderDecoded D-STAR header.
diagnostics: Vec<Diagnostic>Diagnostics observed during header parsing.
VoiceFrame
A voice data frame within an active stream.
VoiceEnd
Voice stream ended (real EOT or synthesized after timeout).
Fields
reason: VoiceEndReasonReal EOT vs synthesized after inactivity.