pub struct Alert {
pub active_period: Vec<TimeRange>,
pub informed_entity: Vec<EntitySelector>,
pub cause: Option<i32>,
pub effect: Option<i32>,
pub url: Option<TranslatedString>,
pub header_text: Option<TranslatedString>,
pub description_text: Option<TranslatedString>,
}
Expand description
An alert, indicating some sort of incident in the public transit network.
Fields§
§active_period: Vec<TimeRange>
Time when the alert should be shown to the user. If missing, the alert will be shown as long as it appears in the feed. If multiple ranges are given, the alert will be shown during all of them.
informed_entity: Vec<EntitySelector>
Entities whose users we should notify of this alert.
cause: Option<i32>
§effect: Option<i32>
§url: Option<TranslatedString>
The URL which provides additional information about the alert.
header_text: Option<TranslatedString>
Alert header. Contains a short summary of the alert text as plain-text.
description_text: Option<TranslatedString>
Full description for the alert as plain-text. The information in the description should add to the information of the header.
Implementations§
Trait Implementations§
source§impl Message for Alert
impl Message for Alert
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
Encodes the message to a buffer. Read more
source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
Encodes the message with a length-delimiter to a buffer. Read more
source§fn decode<B>(buf: B) -> Result<Self, DecodeError>where
B: IntoBuf,
Self: Default,
fn decode<B>(buf: B) -> Result<Self, DecodeError>where
B: IntoBuf,
Self: Default,
Decodes an instance of the message from a buffer. Read more
source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where
B: IntoBuf,
Self: Default,
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where
B: IntoBuf,
Self: Default,
Decodes a length-delimited instance of the message from the buffer.
source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: IntoBuf,
Self: Sized,
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: IntoBuf,
Self: Sized,
Decodes an instance of the message from a buffer, and merges it into
self
. Read moresource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: IntoBuf,
Self: Sized,
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: IntoBuf,
Self: Sized,
Decodes a length-delimited instance of the message from buffer, and
merges it into
self
. Read more