Enum sameold::Originator
source · pub enum Originator {
Unknown,
PrimaryEntryPoint,
CivilAuthority,
WeatherService,
NationalWeatherService,
EnvironmentCanada,
BroadcastStation,
}Expand description
SAME message originator code
See Message::originator().
Originator codes may be converted from() their SAME string
representations. Using them .as_ref() or via Display will
show a human-readable string.
The variants NationalWeatherService and EnvironmentCanada
must be constructed using both the originator string and the
station callsign.
use sameold::Originator;
let orig = Originator::from("WXR");
assert_eq!(Originator::WeatherService, orig);
assert_eq!("WXR", orig.as_ref());
assert_eq!("Weather Service", orig.as_display_str());
assert_eq!("Weather Service", &format!("{}", orig));
assert_eq!(Originator::Unknown, Originator::from("HUH"));
let orig = Originator::from(("WXR", "KLOX/NWS"));
assert_eq!("National Weather Service", orig.as_display_str());
assert_eq!("WXR", orig.as_str());
assert_eq!(Originator::EnvironmentCanada,
Originator::from(("WXR", "EC/GC/CA")));Variants§
Unknown
An unknown (and probably invalid) Originator code
Per NWSI 10-172, receivers should accept any originator code.
PrimaryEntryPoint
Primary Entry Point station for national activations
Nation-wide activations are authorized by the President of the United States. Takes priority over all other messages/station programming.
CivilAuthority
Civil authorities
WeatherService
National Weather Service or Environment Canada
NationalWeatherService
National Weather Service
EnvironmentCanada
Environment Canada
BroadcastStation
EAS participant (usu. broadcast station)
Implementations§
source§impl Originator
impl Originator
Trait Implementations§
source§impl AsRef<str> for Originator
impl AsRef<str> for Originator
source§impl Clone for Originator
impl Clone for Originator
source§fn clone(&self) -> Originator
fn clone(&self) -> Originator
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for Originator
impl Debug for Originator
source§impl Display for Originator
impl Display for Originator
source§impl EnumMessage for Originator
impl EnumMessage for Originator
fn get_message(&self) -> Option<&'static str>
fn get_detailed_message(&self) -> Option<&'static str>
fn get_serializations(&self) -> &'static [&'static str]
source§impl From<&str> for Originator
impl From<&str> for Originator
source§fn from(s: &str) -> Originator
fn from(s: &str) -> Originator
source§impl FromStr for Originator
impl FromStr for Originator
source§impl Hash for Originator
impl Hash for Originator
source§impl PartialEq<Originator> for Originator
impl PartialEq<Originator> for Originator
source§fn eq(&self, other: &Originator) -> bool
fn eq(&self, other: &Originator) -> bool
self and other values to be equal, and is used
by ==.impl Copy for Originator
impl Eq for Originator
impl StructuralEq for Originator
impl StructuralPartialEq for Originator
Auto Trait Implementations§
impl RefUnwindSafe for Originator
impl Send for Originator
impl Sync for Originator
impl Unpin for Originator
impl UnwindSafe for Originator
Blanket Implementations§
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.