pub struct FeedHeader {
pub gtfs_realtime_version: String,
pub incrementality: Option<i32>,
pub timestamp: Option<u64>,
pub feed_version: Option<String>,
}
Expand description
Metadata about a feed, included in feed messages.
Fields§
§gtfs_realtime_version: String
Version of the feed specification. The current version is 2.0. Valid versions are “2.0”, “1.0”.
incrementality: Option<i32>
§timestamp: Option<u64>
This timestamp identifies the moment when the content of this feed has been created (in server time). In POSIX time (i.e., number of seconds since January 1st 1970 00:00:00 UTC).
feed_version: Option<String>
String that matches the feed_info.feed_version from the GTFS feed that the real time data is based on. Consumers can use this to identify which GTFS feed is currently active or when a new one is available to download.
Implementations§
Source§impl FeedHeader
impl FeedHeader
Sourcepub fn incrementality(&self) -> Incrementality
pub fn incrementality(&self) -> Incrementality
Returns the enum value of incrementality
, or the default if the field is unset or set to an invalid enum value.
Sourcepub fn set_incrementality(&mut self, value: Incrementality)
pub fn set_incrementality(&mut self, value: Incrementality)
Sets incrementality
to the provided enum value.
Sourcepub fn timestamp(&self) -> u64
pub fn timestamp(&self) -> u64
Returns the value of timestamp
, or the default value if timestamp
is unset.
Sourcepub fn feed_version(&self) -> &str
pub fn feed_version(&self) -> &str
Returns the value of feed_version
, or the default value if feed_version
is unset.
Trait Implementations§
Source§impl Clone for FeedHeader
impl Clone for FeedHeader
Source§fn clone(&self) -> FeedHeader
fn clone(&self) -> FeedHeader
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for FeedHeader
impl Debug for FeedHeader
Source§impl Default for FeedHeader
impl Default for FeedHeader
Source§impl<'de> Deserialize<'de> for FeedHeader
impl<'de> Deserialize<'de> for FeedHeader
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Hash for FeedHeader
impl Hash for FeedHeader
Source§impl Message for FeedHeader
impl Message for FeedHeader
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.