Struct map_model::TransitRoute
source · pub struct TransitRoute {
pub id: TransitRouteID,
pub long_name: String,
pub short_name: String,
pub gtfs_id: String,
pub stops: Vec<TransitStopID>,
pub start: LaneID,
pub end_border: Option<LaneID>,
pub route_type: PathConstraints,
pub spawn_times: Vec<Time>,
pub orig_spawn_times: Vec<Time>,
}
Fields§
§id: TransitRouteID
§long_name: String
§short_name: String
§gtfs_id: String
§stops: Vec<TransitStopID>
§start: LaneID
A transit vehicle spawns at the beginning of this lane. This lane may be at a border or the first stop. For the non-border case, the lane must be long enough for the vehicle to spawn.
end_border: Option<LaneID>
A transit vehicle either vanishes at its last stop or exits the map through this border.
route_type: PathConstraints
§spawn_times: Vec<Time>
Non-empty, times in order for one day when a vehicle should begin at start.
orig_spawn_times: Vec<Time>
Explicitly store whatever the original was, since this can’t be reconstructed without side input.
Implementations§
source§impl TransitRoute
impl TransitRoute
fn all_path_requests(&self, map: &Map) -> Vec<PathRequest>
sourcepub fn all_paths(&self, map: &Map) -> Result<Vec<Path>>
pub fn all_paths(&self, map: &Map) -> Result<Vec<Path>>
Entry i is the path to drive to stop i. The very last entry is to drive from the last step to the place where the vehicle vanishes.
pub fn plural_noun(&self) -> &'static str
Trait Implementations§
source§impl Clone for TransitRoute
impl Clone for TransitRoute
source§fn clone(&self) -> TransitRoute
fn clone(&self) -> TransitRoute
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 TransitRoute
impl Debug for TransitRoute
source§impl<'de> Deserialize<'de> for TransitRoute
impl<'de> Deserialize<'de> for TransitRoute
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for TransitRoute
impl RefUnwindSafe for TransitRoute
impl Send for TransitRoute
impl Sync for TransitRoute
impl Unpin for TransitRoute
impl UnwindSafe for TransitRoute
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