Struct gtfs_structures::Shape
source · pub struct Shape {
pub id: String,
pub latitude: f64,
pub longitude: f64,
pub sequence: usize,
pub dist_traveled: Option<f32>,
}
Expand description
A single geographical point decribing the shape of a Trip. See https://gtfs.org/reference/static/#shapestxt
Fields§
§id: String
Unique technical (not for the traveller) identifier for the Shape
latitude: f64
Latitude of a shape point
longitude: f64
Longitude of a shape point
sequence: usize
Sequence in which the shape points connect to form the shape. Values increase along the trip but do not need to be consecutive.
dist_traveled: Option<f32>
Actual distance traveled along the shape from the first shape point to the point specified in this record. Used by trip planners to show the correct portion of the shape on a map
Trait Implementations§
source§impl<'de> Deserialize<'de> for Shape
impl<'de> Deserialize<'de> for Shape
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
source§impl Type for Shape
impl Type for Shape
source§fn object_type(&self) -> ObjectType
fn object_type(&self) -> ObjectType
What is the type of the object
Auto Trait Implementations§
impl Freeze for Shape
impl RefUnwindSafe for Shape
impl Send for Shape
impl Sync for Shape
impl Unpin for Shape
impl UnwindSafe for Shape
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