Struct gtfs_rt::VehicleDescriptor
source · pub struct VehicleDescriptor {
pub id: Option<String>,
pub label: Option<String>,
pub license_plate: Option<String>,
pub wheelchair_accessible: Option<i32>,
}
Expand description
Identification information for the vehicle performing the trip.
Fields§
§id: Option<String>
Internal system identification of the vehicle. Should be unique per vehicle, and can be used for tracking the vehicle as it proceeds through the system.
label: Option<String>
User visible label, i.e., something that must be shown to the passenger to help identify the correct vehicle.
license_plate: Option<String>
The license plate of the vehicle.
wheelchair_accessible: Option<i32>
Implementations§
source§impl VehicleDescriptor
impl VehicleDescriptor
sourcepub fn label(&self) -> &str
pub fn label(&self) -> &str
Returns the value of label
, or the default value if label
is unset.
sourcepub fn license_plate(&self) -> &str
pub fn license_plate(&self) -> &str
Returns the value of license_plate
, or the default value if license_plate
is unset.
sourcepub fn wheelchair_accessible(&self) -> WheelchairAccessible
pub fn wheelchair_accessible(&self) -> WheelchairAccessible
Returns the enum value of wheelchair_accessible
, or the default if the field is unset or set to an invalid enum value.
sourcepub fn set_wheelchair_accessible(&mut self, value: WheelchairAccessible)
pub fn set_wheelchair_accessible(&mut self, value: WheelchairAccessible)
Sets wheelchair_accessible
to the provided enum value.
Trait Implementations§
source§impl Clone for VehicleDescriptor
impl Clone for VehicleDescriptor
source§fn clone(&self) -> VehicleDescriptor
fn clone(&self) -> VehicleDescriptor
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 VehicleDescriptor
impl Debug for VehicleDescriptor
source§impl Default for VehicleDescriptor
impl Default for VehicleDescriptor
source§impl Message for VehicleDescriptor
impl Message for VehicleDescriptor
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 VehicleDescriptor
impl PartialEq for VehicleDescriptor
source§fn eq(&self, other: &VehicleDescriptor) -> bool
fn eq(&self, other: &VehicleDescriptor) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for VehicleDescriptor
impl Serialize for VehicleDescriptor
impl StructuralPartialEq for VehicleDescriptor
Auto Trait Implementations§
impl Freeze for VehicleDescriptor
impl RefUnwindSafe for VehicleDescriptor
impl Send for VehicleDescriptor
impl Sync for VehicleDescriptor
impl Unpin for VehicleDescriptor
impl UnwindSafe for VehicleDescriptor
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