[−][src]Struct tendermint_light_client::types::Time
Tendermint timestamps https://github.com/tendermint/spec/blob/d46cd7f573a2c6a2399fcab2cde981330aa63f37/spec/core/data_structures.md#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]
&self,
other: Time
) -> Result<Duration, Box<dyn Error + 'static + Send + Sync, Global>>
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]
s: &str
) -> Result<Time, Box<dyn Error + 'static + Send + Sync, Global>>
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]
&self
) -> Result<SystemTime, Box<dyn Error + 'static + Send + Sync, Global>>
Convert Time
to SystemTime
Trait Implementations
impl Add<Duration> for Time
[src]
type Output = Time
The resulting type after applying the +
operator.
pub 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]
pub 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]
pub fn from(t: SystemTime) -> 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.
pub fn from_str(s: &str) -> Result<Time, <Time as FromStr>::Err>
[src]
impl Ord for Time
[src]
pub fn cmp(&self, other: &Time) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<Time> for Time
[src]
impl PartialOrd<Time> for Time
[src]
pub fn partial_cmp(&self, other: &Time) -> Option<Ordering>
[src]
pub fn lt(&self, other: &Time) -> bool
[src]
pub fn le(&self, other: &Time) -> bool
[src]
pub fn gt(&self, other: &Time) -> bool
[src]
pub fn ge(&self, other: &Time) -> bool
[src]
impl Protobuf<Timestamp> for Time
[src]
pub fn encode<B>(&self, buf: &mut B) -> Result<(), Error<Kind>> where
B: BufMut,
[src]
B: BufMut,
pub fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), Error<Kind>> where
B: BufMut,
[src]
B: BufMut,
pub fn decode<B>(buf: B) -> Result<Self, Error<Kind>> where
B: Buf,
[src]
B: Buf,
pub fn decode_length_delimited<B>(buf: B) -> Result<Self, Error<Kind>> where
B: Buf,
[src]
B: Buf,
pub fn encoded_len(&self) -> usize
[src]
pub fn encode_vec(&self) -> Result<Vec<u8, Global>, Error<Kind>>
[src]
pub fn decode_vec(v: &[u8]) -> Result<Self, Error<Kind>>
[src]
pub fn encode_length_delimited_vec(
&self
) -> Result<Vec<u8, Global>, Error<Kind>>
[src]
&self
) -> Result<Vec<u8, Global>, Error<Kind>>
pub fn decode_length_delimited_vec(v: &[u8]) -> Result<Self, Error<Kind>>
[src]
impl Serialize for Time
[src]
pub 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]
type Output = Time
The resulting type after applying the -
operator.
pub fn sub(self, rhs: Duration) -> <Time as Sub<Duration>>::Output
[src]
impl TryFrom<Timestamp> for Time
[src]
Auto Trait Implementations
impl RefUnwindSafe for Time
[src]
impl Send for Time
[src]
impl Sync for Time
[src]
impl Unpin for Time
[src]
impl UnwindSafe for Time
[src]
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,
pub 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,
pub fn equivalent(&self, key: &K) -> bool
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
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.
pub fn to_owned(&self) -> T
[src]
pub 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.
pub 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.
pub 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>,