Struct gtfs_structures::Route

source ·
pub struct Route {
    pub id: String,
    pub short_name: Option<String>,
    pub long_name: Option<String>,
    pub desc: Option<String>,
    pub route_type: RouteType,
    pub url: Option<String>,
    pub agency_id: Option<String>,
    pub order: Option<u32>,
    pub color: RGB8,
    pub text_color: RGB8,
    pub continuous_pickup: ContinuousPickupDropOff,
    pub continuous_drop_off: ContinuousPickupDropOff,
}
Expand description

A route is a commercial line (there can be various stop sequences for a same line). See https://gtfs.org/reference/static/#routestxt

Fields§

§id: String

Unique technical (not for the traveller) identifier for the route

§short_name: Option<String>

Short name of a route. This will often be a short, abstract identifier like “32”, “100X”, or “Green” that riders use to identify a route, but which doesn’t give any indication of what places the route serves

§long_name: Option<String>

Full name of a route. This name is generally more descriptive than the Route::short_name] and often includes the route’s destination or stop

§desc: Option<String>

Description of a route that provides useful, quality information

§route_type: RouteType

Indicates the type of transportation used on a route

§url: Option<String>

URL of a web page about the particular route

§agency_id: Option<String>

Agency for the specified route

§order: Option<u32>

Orders the routes in a way which is ideal for presentation to customers. Routes with smaller route_sort_order values should be displayed first.

§color: RGB8

Route color designation that matches public facing material

§text_color: RGB8

Legible color to use for text drawn against a background of [Route::route_color]

§continuous_pickup: ContinuousPickupDropOff

Indicates whether a rider can board the transit vehicle anywhere along the vehicle’s travel path

§continuous_drop_off: ContinuousPickupDropOff

Indicates whether a rider can alight from the transit vehicle at any point along the vehicle’s travel path

Trait Implementations§

source§

impl Clone for Route

source§

fn clone(&self) -> Route

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Route

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Route

source§

fn default() -> Route

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for Route

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Display for Route

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Id for Route

source§

fn id(&self) -> &str

Identifier of the object
source§

impl Serialize for Route

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Type for Route

source§

fn object_type(&self) -> ObjectType

What is the type of the object

Auto Trait Implementations§

§

impl Freeze for Route

§

impl RefUnwindSafe for Route

§

impl Send for Route

§

impl Sync for Route

§

impl Unpin for Route

§

impl UnwindSafe for Route

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,