pub struct GTFSTransfer {
pub from_stop_id: Option<String>,
pub to_stop_id: Option<String>,
pub from_route_id: Option<String>,
pub to_route_id: Option<String>,
pub from_trip_id: Option<String>,
pub to_trip_id: Option<String>,
pub transfer_type: i8,
pub min_transfer_time: Option<u32>,
}Expand description
§Transfers
Optional Defines additional rules/overrides for transfers between routes/trips/stops. The level of specificity is determined by which fields are present:
- from_trip_id & to_trip_id (most specific)
- route vs. trip combos
- only from_stop_id & to_stop_id (least specific)
Primary Key: (from_stop_id, to_stop_id, from_trip_id, to_trip_id, from_route_id, to_route_id)
Fields§
§from_stop_id: Option<String>Conditionally Required
Identifies where a connection begins (stops.stop_id, location_type=0 or 1).
Required if transfer_type is 1, 2, or 3. Optional if transfer_type is 4 or 5.
to_stop_id: Option<String>Conditionally Required
Identifies where a connection ends (stops.stop_id, location_type=0 or 1).
Required if transfer_type is 1, 2, or 3. Optional if transfer_type is 4 or 5.
from_route_id: Option<String>Optional
Identifies a route on which the arriving trip is running.
If both fromTripId and fromRouteId are defined, the trip must belong to that route,
but fromTripId takes precedence.
to_route_id: Option<String>Optional
Identifies a route on which the departing trip is running.
If both toTripId and toRouteId are defined, the trip must belong to that route,
but toTripId takes precedence.
from_trip_id: Option<String>Conditionally Required
Identifies the arriving trip (trips.trip_id).
Required if transfer_type is 4 or 5; optional otherwise.
to_trip_id: Option<String>Conditionally Required
Identifies the departing trip (trips.trip_id).
Required if transfer_type is 4 or 5; optional otherwise.
transfer_type: i8Required Indicates the type of connection:
- 0 = Recommended
- 1 = Timed
- 2 = Requires min_transfer_time
- 3 = Not possible
- 4 = In-seat transfer
- 5 = In-seat transfer not allowed
min_transfer_time: Option<u32>Optional
Time in seconds required for a rider to complete the transfer. If transfer_type=2,
this is the minimum transfer time.
Implementations§
Source§impl GTFSTransfer
impl GTFSTransfer
Sourcepub fn new(source: &str) -> Vec<GTFSTransfer>
pub fn new(source: &str) -> Vec<GTFSTransfer>
Create a new GTFSTransfer
Sourcepub fn transfer_type(&self) -> GTFSTransferType
pub fn transfer_type(&self) -> GTFSTransferType
Get the transfer_type
Trait Implementations§
Source§impl Clone for GTFSTransfer
impl Clone for GTFSTransfer
Source§fn clone(&self) -> GTFSTransfer
fn clone(&self) -> GTFSTransfer
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for GTFSTransfer
impl Debug for GTFSTransfer
Source§impl Default for GTFSTransfer
impl Default for GTFSTransfer
Source§fn default() -> GTFSTransfer
fn default() -> GTFSTransfer
Source§impl From<&Map<String, ValueType>> for GTFSTransfer
Starting from a ref to an MValue, convert to a struct
impl From<&Map<String, ValueType>> for GTFSTransfer
Starting from a ref to an MValue, convert to a struct
Source§impl From<&ValueType> for GTFSTransfer
If this struct ref is nested into another struct, pull out the MValue and let
From handle
impl From<&ValueType> for GTFSTransfer
If this struct ref is nested into another struct, pull out the MValue and let
From
Source§impl From<GTFSTransfer> for MValue
Starting from a struct, convert to an MValue
impl From<GTFSTransfer> for MValue
Starting from a struct, convert to an MValue
Source§fn from(value: GTFSTransfer) -> MValue
fn from(value: GTFSTransfer) -> MValue
Source§impl From<GTFSTransfer> for ValueType
If this struct is nested into another struct, convert to a ValueType that’s nested
impl From<GTFSTransfer> for ValueType
If this struct is nested into another struct, convert to a ValueType that’s nested
Source§fn from(value: GTFSTransfer) -> ValueType
fn from(value: GTFSTransfer) -> ValueType
Source§impl From<Map<String, ValueType>> for GTFSTransfer
Starting from an MValue, convert to a struct
impl From<Map<String, ValueType>> for GTFSTransfer
Starting from an MValue, convert to a struct
Source§impl From<ValueType> for GTFSTransfer
If this struct is nested into another struct, pull out the MValue and let
From handle
impl From<ValueType> for GTFSTransfer
If this struct is nested into another struct, pull out the MValue and let
From
Source§impl PartialEq for GTFSTransfer
impl PartialEq for GTFSTransfer
impl MValueCompatible for GTFSTransfer
Finally implement the MValueCompatible trait
impl StructuralPartialEq for GTFSTransfer
Auto Trait Implementations§
impl Freeze for GTFSTransfer
impl RefUnwindSafe for GTFSTransfer
impl Send for GTFSTransfer
impl Sync for GTFSTransfer
impl Unpin for GTFSTransfer
impl UnwindSafe for GTFSTransfer
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().