[−][src]Struct holochain_core_types::time::Period
A human-readable time Period, implemented as a std::time::Duration (which is unsigned). Conversion to/from and Serializable to/from readable form: "1w2d3h4.567s", at full Duration precision; values > 1s w/ ms precision are formatted to fractional seconds w/ full precision, while values < 1s are formatted to integer ms, us or ns as appropriate. Accepts y/yr/year, w/wk/week, d/dy/day, h/hr/hour, m/min/minute, s/sec/second, ms/millis/millisecond, u/μ/micros/microsecond, n/nanos/nanosecond, singular or plural. The humantime and parse_duration crates are complex, incompatible with each other, depend on crates and/or do not compile to WASM.
Trait Implementations
impl<'a> From<&'a Period> for JsonString
[src]
fn from(v: &Period) -> JsonString
[src]
impl From<Period> for JsonString
[src]
fn from(v: Period) -> JsonString
[src]
impl From<Period> for Timeout
[src]
impl From<Period> for Duration
[src]
impl<'_> From<&'_ Period> for Duration
[src]
impl From<Duration> for Period
[src]
impl<'_> From<&'_ Duration> for Period
[src]
impl Clone for Period
[src]
impl Eq for Period
[src]
impl PartialEq<Period> for Period
[src]
impl Display for Period
[src]
impl Debug for Period
[src]
Outputs the human-readable form of the Period's Duration, eg. "1y2w3d4h56m7.89s", "456ms". Debug output of Period specifier instead of underlying Duration seconds.
impl<'a> TryFrom<&'a JsonString> for Period
[src]
type Error = JsonError
The type returned in the event of a conversion error.
fn try_from(json_string: &JsonString) -> Result<Self, Self::Error>
[src]
impl TryFrom<JsonString> for Period
[src]
type Error = JsonError
The type returned in the event of a conversion error.
fn try_from(json_string: JsonString) -> Result<Self, Self::Error>
[src]
impl TryFrom<String> for Period
[src]
type Error = HolochainError
The type returned in the event of a conversion error.
fn try_from(s: String) -> Result<Self, Self::Error>
[src]
impl<'_> TryFrom<&'_ str> for Period
[src]
type Error = HolochainError
The type returned in the event of a conversion error.
fn try_from(s: &str) -> Result<Self, Self::Error>
[src]
impl FromStr for Period
[src]
type Err = HolochainError
The associated error which can be returned from parsing.
fn from_str(period_str: &str) -> Result<Self, Self::Err>
[src]
impl Hash for Period
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl StructuralPartialEq for Period
[src]
impl StructuralEq for Period
[src]
impl Serialize for Period
[src]
Serialization w/ serde_json to/from String. This means that a timestamp will be deserialized to an Period specification and validated, which may fail, returning a serde::de::Error. Upon serialization, the canonicalized Period specification will be used.
impl<'d> Deserialize<'d> for Period
[src]
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'d>,
[src]
D: Deserializer<'d>,
Auto Trait Implementations
impl Send for Period
impl Sync for Period
impl Unpin for Period
impl UnwindSafe for Period
impl RefUnwindSafe for Period
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
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<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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: 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> Clone for T where
T: Clone,
[src]
T: Clone,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,