google_maps 3.9.6

An unofficial Google Maps Platform client library for the Rust programming language.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
impl crate::places::place_autocomplete::Request<'_> {
    /// Adds the origin parameter to the Place API _Place Autocomplete_ query.
    ///
    /// ## Arguments
    ///
    /// * `origin` ‧ The origin point from which to calculate straight-line
    ///   distance to the destination (returned as `distance_meters`). If this
    ///   value is omitted, straight-line distance will not be returned.
    #[must_use] pub fn with_origin(
        mut self,
        origin: impl Into<crate::types::LatLng>
    ) -> Self {
        // Set origin in Request struct.
        self.origin = Some(origin.into());
        // Return modified Request struct to caller.
        self
    } // fn
} // impl