pub struct TripSegment {
pub trips: Vec<TripInfo>,
pub route_color: Option<String>,
pub mode: Mode,
pub distance: f64,
pub from: Box<Place>,
pub to: Box<Place>,
pub departure: String,
pub arrival: String,
pub scheduled_departure: String,
pub scheduled_arrival: String,
pub real_time: bool,
pub polyline: String,
}
Expand description
TripSegment : trip segment between two stops to show a trip on a map
Fields§
§trips: Vec<TripInfo>
§route_color: Option<String>
§mode: Mode
Transport mode for this leg
distance: f64
distance in meters
from: Box<Place>
§to: Box<Place>
§departure: String
departure time
arrival: String
arrival time
scheduled_departure: String
scheduled departure time
scheduled_arrival: String
scheduled arrival time
real_time: bool
Whether there is real-time data about this leg
polyline: String
Google polyline encoded coordinate sequence (with precision 7) where the trip travels on this segment.
Implementations§
Source§impl TripSegment
impl TripSegment
Trait Implementations§
Source§impl Clone for TripSegment
impl Clone for TripSegment
Source§fn clone(&self) -> TripSegment
fn clone(&self) -> TripSegment
Returns a duplicate 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 TripSegment
impl Debug for TripSegment
Source§impl Default for TripSegment
impl Default for TripSegment
Source§fn default() -> TripSegment
fn default() -> TripSegment
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for TripSegment
impl<'de> Deserialize<'de> for TripSegment
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 PartialEq for TripSegment
impl PartialEq for TripSegment
Source§impl Serialize for TripSegment
impl Serialize for TripSegment
impl StructuralPartialEq for TripSegment
Auto Trait Implementations§
impl Freeze for TripSegment
impl RefUnwindSafe for TripSegment
impl Send for TripSegment
impl Sync for TripSegment
impl Unpin for TripSegment
impl UnwindSafe for TripSegment
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