[][src]Struct forecast::ForecastRequestBuilder

pub struct ForecastRequestBuilder<'a> { /* fields omitted */ }

Builder object used to construct a ForecastRequest.

Methods

impl<'a> ForecastRequestBuilder<'a>[src]

pub fn new(
    api_key: &'a str,
    latitude: f64,
    longitude: f64
) -> ForecastRequestBuilder
[src]

A Forecast API request is constructed with required params api_key, latitude, and longitude.

pub fn exclude_block(
    self,
    exclude_block: ExcludeBlock
) -> ForecastRequestBuilder<'a>
[src]

Add a DataBlock to exclude from the response.

pub fn exclude_blocks(
    self,
    exclude_blocks: &mut Vec<ExcludeBlock>
) -> ForecastRequestBuilder<'a>
[src]

Add multiple DataBlocks to exclude from the response.

pub fn extend(self, extend: ExtendBy) -> ForecastRequestBuilder<'a>[src]

Extend the time window of the response data from 48 hours to 168 hours.

pub fn lang(self, lang: Lang) -> ForecastRequestBuilder<'a>[src]

Set the language for messages in the response data.

pub fn units(self, units: Units) -> ForecastRequestBuilder<'a>[src]

Set the measurement units for response data.

pub fn build(self) -> ForecastRequest<'a>[src]

Finalize the request.

Trait Implementations

impl<'a> Clone for ForecastRequestBuilder<'a>[src]

impl<'a> Debug for ForecastRequestBuilder<'a>[src]

impl<'a> PartialEq<ForecastRequestBuilder<'a>> for ForecastRequestBuilder<'a>[src]

impl<'a> StructuralPartialEq for ForecastRequestBuilder<'a>[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.