[−][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.
Implementations
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(&mut 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,
timestamp: DateTime<Utc>
) -> Request<'_>
[src]
client_settings: &mut ClientSettings,
location: LatLng,
timestamp: DateTime<Utc>
) -> 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.timestamp
- Time is used to determine if Daylight Savings is applicable.
Example:
let time_zone = TimeZoneRequest::new( &mut my_settings, // St. Vitus Cathedral in Prague, Czechia LatLng::try_from(50.090_903, 14.400_512).unwrap(), // Tuesday February 15, 2022 @ 6:00:00 pm NaiveDate::from_ymd(2022, 2, 15).and_hms(18, 00, 0) ).execute();
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> Eq for Request<'a>
[src]
impl<'a> Ord for Request<'a>
[src]
pub fn cmp(&self, other: &Request<'a>) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl<'a> PartialEq<Request<'a>> for Request<'a>
[src]
pub fn eq(&self, other: &Request<'a>) -> bool
[src]
pub fn ne(&self, other: &Request<'a>) -> bool
[src]
impl<'a> PartialOrd<Request<'a>> for Request<'a>
[src]
pub fn partial_cmp(&self, other: &Request<'a>) -> Option<Ordering>
[src]
pub fn lt(&self, other: &Request<'a>) -> bool
[src]
pub fn le(&self, other: &Request<'a>) -> bool
[src]
pub fn gt(&self, other: &Request<'a>) -> bool
[src]
pub fn ge(&self, other: &Request<'a>) -> bool
[src]
impl<'a> StructuralEq for Request<'a>
[src]
impl<'a> StructuralPartialEq for Request<'a>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for Request<'a>
[src]
impl<'a> Send for Request<'a>
[src]
impl<'a> Sync for Request<'a>
[src]
impl<'a> Unpin for Request<'a>
[src]
impl<'a> !UnwindSafe for Request<'a>
[src]
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,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
pub fn equivalent(&self, key: &K) -> bool
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[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.
pub 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.
pub 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>,