[][src]Enum transistor::types::http::TimeHistory

pub enum TimeHistory {
    ValidTime(Option<DateTime<Utc>>, Option<DateTime<Utc>>),
    TransactionTime(Option<DateTime<Utc>>, Option<DateTime<Utc>>),
}

enum TimeHistory is used as an argument in the function entity_history_timed. It is responsible for defining valid-time and transaction-times ranges for the query. The possible options are ValidTime and TransactionTime, both of them receive two Option<DateTime<Utc>>. The first parameter will transform into an start time and the second into and end-time, and they will be formated as %Y-%m-%dT%H:%M:%S. The query params will become:

  • ValidTime(Some(start), Some(end)) => "&start-valid-time={}&end-valid-time={}"
  • ValidTime(None, Some(end)) => "&end-valid-time={}"
  • ValidTime(Some(start), None) => "&start-valid-time={}"
  • ValidTime(None, None) => "",
  • TransactionTime(Some(start), Some(end)) => "&start-transaction-time={}&end-transaction-time={}"
  • TransactionTime(None, Some(end)) => "&end-transaction-time={}"
  • TransactionTime(Some(start), None) => "&start-transaction-time={}"
  • TransactionTime(None, None) => "",

Variants

TransactionTime(Option<DateTime<Utc>>, Option<DateTime<Utc>>)

Trait Implementations

impl Debug for TimeHistory[src]

impl PartialEq<TimeHistory> for TimeHistory[src]

impl Serialize for TimeHistory[src]

impl StructuralPartialEq for TimeHistory[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, 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.