Struct gtfs_rt::FeedHeader
source · pub struct FeedHeader {
pub gtfs_realtime_version: String,
pub incrementality: Option<i32>,
pub timestamp: Option<u64>,
}
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).
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.
Trait Implementations§
source§impl Clone for FeedHeader
impl Clone for FeedHeader
source§fn clone(&self) -> FeedHeader
fn clone(&self) -> FeedHeader
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for FeedHeader
impl Debug for FeedHeader
source§impl Default for FeedHeader
impl Default for FeedHeader
source§impl Message for FeedHeader
impl Message for FeedHeader
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>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Encodes the message to a buffer. Read more
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
Encodes the message to a newly allocated buffer.
source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Encodes the message with a length-delimiter to a buffer. Read more
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,
Encodes the message with a length-delimiter to a newly allocated buffer.
source§fn decode<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
Decodes an instance of the message from a buffer. Read more
source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
Decodes a length-delimited instance of the message from the buffer.
source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
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>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
Decodes a length-delimited instance of the message from buffer, and
merges it into
self
.source§impl PartialEq for FeedHeader
impl PartialEq for FeedHeader
source§fn eq(&self, other: &FeedHeader) -> bool
fn eq(&self, other: &FeedHeader) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for FeedHeader
impl Serialize for FeedHeader
impl StructuralPartialEq for FeedHeader
Auto Trait Implementations§
impl Freeze for FeedHeader
impl RefUnwindSafe for FeedHeader
impl Send for FeedHeader
impl Sync for FeedHeader
impl Unpin for FeedHeader
impl UnwindSafe for FeedHeader
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