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
sourceimpl<'de> Deserialize<'de> for Shape
impl<'de> Deserialize<'de> for Shape
sourcefn 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
sourceimpl Type for Shape
impl Type for Shape
sourcefn object_type(&self) -> ObjectType
fn object_type(&self) -> ObjectType
What is the type of the object
Auto Trait Implementations
impl RefUnwindSafe for Shape
impl Send for Shape
impl Sync for Shape
impl Unpin for Shape
impl UnwindSafe for Shape
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
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
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more