[][src]Struct tendermint_light_client::types::Time

pub struct Time(_);

Implementations

impl Time[src]

pub fn now() -> Time[src]

Get Time value representing the current wall clock time

pub fn unix_epoch() -> Time[src]

Get the UNIX_EPOCH time ("1970-01-01 00:00:00 UTC") as a Time

pub fn duration_since(
    &self,
    other: Time
) -> Result<Duration, Box<dyn Error + 'static + Send + Sync, Global>>
[src]

Calculate the amount of time which has passed since another Time as a std::time::Duration

pub fn parse_from_rfc3339(
    s: &str
) -> Result<Time, Box<dyn Error + 'static + Send + Sync, Global>>
[src]

Parse Time from an RFC 3339 date

pub fn to_rfc3339(&self) -> String[src]

Return an RFC 3339 and ISO 8601 date and time string with 6 subseconds digits and Z.

pub fn to_system_time(
    &self
) -> Result<SystemTime, Box<dyn Error + 'static + Send + Sync, Global>>
[src]

Convert Time to SystemTime

Trait Implementations

impl Add<Duration> for Time[src]

type Output = Time

The resulting type after applying the + operator.

impl Clone for Time[src]

impl Copy for Time[src]

impl Debug for Time[src]

impl<'de> Deserialize<'de> for Time[src]

impl Display for Time[src]

impl Eq for Time[src]

impl From<DateTime<Utc>> for Time[src]

impl From<SystemTime> for Time[src]

impl FromStr for Time[src]

type Err = Box<dyn Error + 'static + Send + Sync, Global>

The associated error which can be returned from parsing.

impl Ord for Time[src]

impl PartialEq<Time> for Time[src]

impl PartialOrd<Time> for Time[src]

impl Protobuf<Timestamp> for Time[src]

impl Serialize for Time[src]

impl StructuralEq for Time[src]

impl StructuralPartialEq for Time[src]

impl Sub<Duration> for Time[src]

type Output = Time

The resulting type after applying the - operator.

impl TryFrom<Timestamp> for Time[src]

type Error = Box<dyn Error + 'static + Send + Sync, Global>

The type returned in the event of a conversion error.

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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

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

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

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

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> Same<T> for T

type Output = T

Should always be Self

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

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,