Skip to main content

QueryString

Trait QueryString 

Source
pub trait QueryString {
    // Required method
    fn query_string(&self) -> String;
}
Expand description

Provides a way of converting a request struct (such as crate::directions::Request or crate::elevation::Request) to a URL query string that can be used in an HTTP GET request.

Required Methods§

Source

fn query_string(&self) -> String

Converts a request struct (presumably a request type such as crate::directions::Request) to a URL query string that can be used in an HTTP GET request.

§Notes
  • This function does not validate the request before generating the query string. However, the superior method that generates the query URL does perform validation.

  • The query string is the part of the URL after the ? question mark. For example, in the URL https://example.com/over/there?name=ferret the query string is name=ferret

  • There’s no benefit to working on an owned Request struct (i.e. an owned self versus an borrowed &self). percent-encoding works on borrowed UTF-8 strings. Other types, such as enums and numeric values are converted into strings. Therefore no zero-copy operations are possible with an owned self.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl QueryString for &google_maps::places_new::place_details::Request<'_>

Available on crate feature reqwest only.
Source§

impl QueryString for &google_maps::places_new::place_photos::image::Request<'_>

Available on crate feature reqwest only.
Source§

impl QueryString for &google_maps::places_new::place_photos::uri::Request<'_>

Available on crate feature reqwest only.
Source§

impl QueryString for &google_maps::places_new::autocomplete::RequestWithClient<'_>

Available on crate feature reqwest only.
Source§

impl QueryString for &google_maps::places_new::nearby_search::RequestWithClient<'_>

Available on crate feature reqwest only.
Source§

impl QueryString for &google_maps::places_new::text_search::RequestWithClient<'_>

Available on crate feature reqwest only.
Source§

impl QueryString for ForwardRequest<'_>

Source§

impl QueryString for google_maps::directions::request::Request<'_>

Source§

impl QueryString for google_maps::distance_matrix::request::Request<'_>

Source§

impl QueryString for google_maps::elevation::request::Request<'_>

Source§

impl QueryString for google_maps::roads::nearest_roads::request::Request<'_>

Source§

impl QueryString for google_maps::roads::snap_to_roads::request::Request<'_>

Source§

impl QueryString for google_maps::time_zone::request::Request<'_>

Source§

impl QueryString for google_maps::address_validation::provide_validation_feedback::request::Request<'_>

Source§

impl QueryString for google_maps::address_validation::validate_address::request::Request<'_>

Source§

impl QueryString for ReverseRequest<'_>