HistoryApi

Struct HistoryApi 

Source
pub struct HistoryApi<'a, Tz: TimeZone>
where Tz::Offset: Display,
{ /* private fields */ }

Implementations§

Source§

impl<'a, Tz: TimeZone> HistoryApi<'a, Tz>
where Tz::Offset: Display,

Source

pub fn new(client: &'a Client) -> Self

Source

pub fn query(self, query: Query) -> Self

Set up the query

Query parameter based on which data is sent back

Source

pub fn dt(self, dt: DateTime<Tz>) -> Self

Set up a datetime

dt should be on or after 1st Jan, 2010

Source

pub fn end_dt(self, end_dt: DateTime<Tz>) -> Self

Set up a end datetime

end_dt should be on or after 1st Jan, 2010 and should be greater than dt parameter and difference should not be more than 30 days between the two dates.

Source

pub fn hour(self) -> Self

Set up use hour

Time is extracted from dt

Source

pub fn lang(self, lang: Language) -> Self

Set up language

condition:text field in API in the desired language

Trait Implementations§

Source§

impl<'a, Tz: TimeZone> BaseApi<'a> for HistoryApi<'a, Tz>
where Tz::Offset: Display,

Source§

type Model = History

Source§

fn path(&self) -> &str

Source§

fn client(&self) -> &'a Client

Source§

fn params(&self) -> Vec<(&str, String)>

Source§

fn call(&self) -> Result<Self::Model, Error>

Auto Trait Implementations§

§

impl<'a, Tz> Freeze for HistoryApi<'a, Tz>
where <Tz as TimeZone>::Offset: Freeze,

§

impl<'a, Tz> !RefUnwindSafe for HistoryApi<'a, Tz>

§

impl<'a, Tz> Send for HistoryApi<'a, Tz>
where <Tz as TimeZone>::Offset: Send,

§

impl<'a, Tz> Sync for HistoryApi<'a, Tz>
where <Tz as TimeZone>::Offset: Sync,

§

impl<'a, Tz> Unpin for HistoryApi<'a, Tz>
where <Tz as TimeZone>::Offset: Unpin,

§

impl<'a, Tz> !UnwindSafe for HistoryApi<'a, Tz>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> ErasedDestructor for T
where T: 'static,