#[non_exhaustive]pub struct Location {
pub lat_lng: Option<LatLng>,
pub heading: Option<i32>,
/* private fields */
}Expand description
Encapsulates a location (a geographic point, and an optional heading).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.lat_lng: Option<LatLng>The waypoint’s geographic coordinates.
heading: Option<i32>The compass heading associated with the direction of the flow of traffic. This value is used to specify the side of the road to use for pickup and drop-off. Heading values can be from 0 to 360, where 0 specifies a heading of due North, 90 specifies a heading of due East, etc.
Implementations§
Source§impl Location
impl Location
pub fn new() -> Self
Sourcepub fn set_lat_lng<T>(self, v: T) -> Self
pub fn set_lat_lng<T>(self, v: T) -> Self
Sets the value of lat_lng.
Sourcepub fn set_or_clear_lat_lng<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_lat_lng<T>(self, v: Option<T>) -> Self
Sets or clears the value of lat_lng.
Sourcepub fn set_heading<T>(self, v: T) -> Self
pub fn set_heading<T>(self, v: T) -> Self
Sets the value of heading.
Trait Implementations§
impl StructuralPartialEq for Location
Auto Trait Implementations§
impl Freeze for Location
impl RefUnwindSafe for Location
impl Send for Location
impl Sync for Location
impl Unpin for Location
impl UnwindSafe for Location
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