pub(crate) enum MonitorMessage {
Reflector(ReflectorInfo),
Nodes(Vec<NodeInfo>),
Stations(Vec<StationInfo>),
OnAir(String),
OffAir(String),
Unknown(String),
}Expand description
A parsed XLX monitor protocol message.
Each variant corresponds to one of the JSON object shapes the xlxd monitor protocol can produce. See the module-level documentation for the full protocol description and parse ordering rationale.
Variants§
Reflector(ReflectorInfo)
Reflector identity and available modules.
Sent once immediately after the initial "hello" handshake.
Nodes(Vec<NodeInfo>)
Snapshot or update of connected nodes.
Sent once during the initial handshake (full snapshot), then again whenever a node connects or disconnects (incremental update with the full current list).
Stations(Vec<StationInfo>)
Snapshot or update of recently heard stations.
Sent once during the initial handshake, then again whenever a station is heard.
OnAir(String)
A station has started transmitting (keyed up).
The contained string is the operator callsign (possibly padded).
OffAir(String)
A station has stopped transmitting (unkeyed).
The contained string is the operator callsign (possibly padded).
Unknown(String)
An unrecognized JSON message.
Logged for diagnostic purposes but not processed further. This accommodates future protocol extensions without breaking the client.
Trait Implementations§
Source§impl Clone for MonitorMessage
impl Clone for MonitorMessage
Source§fn clone(&self) -> MonitorMessage
fn clone(&self) -> MonitorMessage
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for MonitorMessage
impl RefUnwindSafe for MonitorMessage
impl Send for MonitorMessage
impl Sync for MonitorMessage
impl Unpin for MonitorMessage
impl UnwindSafe for MonitorMessage
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more