pub enum NotificationSeverity {
Normal,
Alert,
Warn,
Alarm,
Emergency,
}Expand description
A Signal K notification’s own severity – the schema’s alarmState
enum, read off a notification’s state field. Five of its six defined
values are modelled here (nominal is left out: the schema defines it,
but no producer this crate has actually been read against – neither
signalk-derived-data nor signalk-ais-target-prioritizer’s own CPA
alarms, both confirmed live – ever emits it, and the same
skip-unrecognised discipline this module keeps everywhere else means
an unmodelled value is simply not a reading rather than a parse
failure).
Ordered least to most severe, the same order the schema itself lists
them in, so a caller can ask “at least Alarm” with a plain
comparison rather than a match.
Variants§
Normal
Nothing wrong.
Alert
Worth a mariner’s attention eventually.
Warn
Worth a mariner’s attention soon.
Alarm
Worth a mariner’s attention now.
Emergency
The most severe level the schema defines.
Trait Implementations§
Source§impl Clone for NotificationSeverity
impl Clone for NotificationSeverity
Source§fn clone(&self) -> NotificationSeverity
fn clone(&self) -> NotificationSeverity
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for NotificationSeverity
Source§impl Debug for NotificationSeverity
impl Debug for NotificationSeverity
impl Eq for NotificationSeverity
Source§impl Ord for NotificationSeverity
impl Ord for NotificationSeverity
Source§fn cmp(&self, other: &NotificationSeverity) -> Ordering
fn cmp(&self, other: &NotificationSeverity) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for NotificationSeverity
impl PartialEq for NotificationSeverity
Source§fn eq(&self, other: &NotificationSeverity) -> bool
fn eq(&self, other: &NotificationSeverity) -> bool
self and other values to be equal, and is used by ==.