[−][src]Struct google_maps::time_zone::request::Request
Look at this Request
struct for documentation on how to build your Time
Zone API query. The methods implemented for this struct are what's used
to build your request.
Methods
impl<'a> Request<'a>
[src]
pub fn build(&mut self) -> &'a mut Request
[src]
Builds the query string for the Google Maps Time Zone API based on the input provided by the client.
Arguments:
This method accepts no arguments.
impl<'a> Request<'a>
[src]
pub fn execute(&'a mut self) -> Result<Response, Error>
[src]
Executes the query you've built.
Description:
My adventures in Rust became messy so I had to make this method. It
wraps the .validate()?.build()?.get()?
chain needed at the end of the
builder pattern.
Arguments:
This method accepts no arguments.
impl<'a> Request<'a>
[src]
pub fn get(&self) -> Result<Response, Error>
[src]
Performs the HTTP get request and returns the response to the caller.
Arguments:
This method accepts no arguments.
impl<'a> Request<'a>
[src]
pub fn new(
client_settings: &mut ClientSettings,
location: LatLng,
time: PrimitiveDateTime
) -> Request
[src]
client_settings: &mut ClientSettings,
location: LatLng,
time: PrimitiveDateTime
) -> Request
Initializes the builder pattern for a Time Zone API query with the required, non-optional parameters.
Arguments:
key
- Your application's Google Cloud API key.location
- Latitude & longitude of the desired time zone location.time
- Time is used to determine if Daylight Savings is applicable.
Example:
let time_zone = Request::new( // St. Vitus Cathedral in Prague, Czechia LatLng { lat: 50.090903, lng: 14.400512 }, PrimitiveDateTime::new( // Tuesday February 15, 2022 Date::try_from_ymd(2022, 2, 15).unwrap(), // 6:00:00 pm Time::try_from_hms(18, 00, 0).unwrap(), ), // Your Google API Key GOOGLE_API_KEY, // Build query string and then perform HTTP get request ).build().get();
impl<'a> Request<'a>
[src]
pub fn with_language(&'a mut self, language: Language) -> &'a mut Request
[src]
Adds the language parameter to the Time Zone API query.
Arguments:
language
‧ The language that Google's response should be presented in.
Example:
- Set Google's response to the French language:
.with_language(Language::French)
Trait Implementations
impl<'a> Debug for Request<'a>
[src]
impl<'a> PartialEq<Request<'a>> for Request<'a>
[src]
impl<'a> PartialOrd<Request<'a>> for Request<'a>
[src]
fn partial_cmp(&self, other: &Request<'a>) -> Option<Ordering>
[src]
fn lt(&self, other: &Request<'a>) -> bool
[src]
fn le(&self, other: &Request<'a>) -> bool
[src]
fn gt(&self, other: &Request<'a>) -> bool
[src]
fn ge(&self, other: &Request<'a>) -> bool
[src]
impl<'a> StructuralPartialEq for Request<'a>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for Request<'a>
impl<'a> Send for Request<'a>
impl<'a> Sync for Request<'a>
impl<'a> Unpin for Request<'a>
impl<'a> !UnwindSafe for Request<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,