#[repr(i32)]pub enum Cause {
UnknownCause = 1,
OtherCause = 2,
TechnicalProblem = 3,
Strike = 4,
Demonstration = 5,
Accident = 6,
Holiday = 7,
Weather = 8,
Maintenance = 9,
Construction = 10,
PoliceActivity = 11,
MedicalEmergency = 12,
}Expand description
Cause of this alert. If cause_detail is included, then Cause must also be included.
Variants§
UnknownCause = 1
OtherCause = 2
Not machine-representable.
TechnicalProblem = 3
Strike = 4
Public transit agency employees stopped working.
Demonstration = 5
People are blocking the streets.
Accident = 6
Holiday = 7
Weather = 8
Maintenance = 9
Construction = 10
PoliceActivity = 11
MedicalEmergency = 12
Implementations§
Source§impl Cause
impl Cause
Sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
Sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
impl Copy for Cause
impl Eq for Cause
Source§impl Ord for Cause
impl Ord for Cause
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for Cause
impl PartialOrd for Cause
impl StructuralPartialEq for Cause
Auto Trait Implementations§
impl Freeze for Cause
impl RefUnwindSafe for Cause
impl Send for Cause
impl Sync for Cause
impl Unpin for Cause
impl UnsafeUnpin for Cause
impl UnwindSafe for Cause
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