[−][src]Struct tendermint_light_client::types::Time
Tendermint timestamps https://github.com/tendermint/tendermint/blob/master/docs/spec/blockchain/blockchain.md#time
Implementations
impl Time
[src]
pub fn now() -> Time
[src]
Get a Timestamp
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 Timestamp
pub fn duration_since(
&self,
other: Time
) -> Result<Duration, Box<dyn Error + 'static + Sync + Send>>
[src]
&self,
other: Time
) -> Result<Duration, Box<dyn Error + 'static + Sync + Send>>
Calculate the amount of time which has passed since another Timestamp
as a std::time::Duration
pub fn parse_from_rfc3339(
s: &str
) -> Result<Time, Box<dyn Error + 'static + Sync + Send>>
[src]
s: &str
) -> Result<Time, Box<dyn Error + 'static + Sync + Send>>
Parse a timestamp 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 + Sync + Send>>
[src]
&self
) -> Result<SystemTime, Box<dyn Error + 'static + Sync + Send>>
Convert this timestamp to a SystemTime
Trait Implementations
impl Add<Duration> for Time
[src]
type Output = Time
The resulting type after applying the +
operator.
fn add(self, rhs: Duration) -> <Time as Add<Duration>>::Output
[src]
impl Clone for Time
[src]
impl Copy for Time
[src]
impl Debug for Time
[src]
impl<'de> Deserialize<'de> for Time
[src]
fn deserialize<__D>(
__deserializer: __D
) -> Result<Time, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
[src]
__deserializer: __D
) -> Result<Time, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
impl Display for Time
[src]
impl Eq for Time
[src]
impl From<DateTime<Utc>> for Time
[src]
impl From<SystemTime> for Time
[src]
fn from(t: SystemTime) -> Time
[src]
impl From<TAI64N> for Time
[src]
impl FromStr for Time
[src]
type Err = Box<dyn Error + 'static + Sync + Send>
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Time, <Time as FromStr>::Err>
[src]
impl Ord for Time
[src]
fn cmp(&self, other: &Time) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<Time> for Time
[src]
impl PartialOrd<Time> for Time
[src]
fn partial_cmp(&self, other: &Time) -> Option<Ordering>
[src]
fn lt(&self, other: &Time) -> bool
[src]
fn le(&self, other: &Time) -> bool
[src]
fn gt(&self, other: &Time) -> bool
[src]
fn ge(&self, other: &Time) -> bool
[src]
impl Serialize for Time
[src]
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
[src]
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
impl StructuralEq for Time
[src]
impl StructuralPartialEq for Time
[src]
impl Sub<Duration> for Time
[src]
Auto Trait Implementations
impl RefUnwindSafe for Time
impl Send for Time
impl Sync for Time
impl Unpin for Time
impl UnwindSafe for Time
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,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
fn equivalent(&self, key: &K) -> bool
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
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.
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.
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>,