pub struct Span { /* private fields */ }Expand description
A duration as this crate’s documents spell one: one or more digits, then exactly one
unit letter — 7d, 36h, 90m, 600s.
One grammar rather than a free one, and deliberately narrow: no spaces, no
combination (1h30m), no fraction, no sign, and no zero, because every place a span
is written names a wait or a bound and a bound of nothing is a mistake rather than a
choice. The check is in the conversion, so a document naming a span this grammar
refuses does not deserialize at all. It is exported because a consumer parses its own
schedule through it, so the two cannot come to read one spelling two ways.
Implementations§
Trait Implementations§
impl Copy for Span
Source§impl Debug for Span
The span itself, quoted — never the wrapper, for the reason every other document
value in this crate spells its own Debug that way.
impl Debug for Span
The span itself, quoted — never the wrapper, for the reason every other document
value in this crate spells its own Debug that way.
Source§impl<'de> Deserialize<'de> for Span
impl<'de> Deserialize<'de> for Span
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Source§impl Display for Span
As written: the number and its unit letter, so a document round-trips byte for byte.
impl Display for Span
As written: the number and its unit letter, so a document round-trips byte for byte.
impl Eq for Span
impl StructuralPartialEq for Span
Auto Trait Implementations§
impl Freeze for Span
impl RefUnwindSafe for Span
impl Send for Span
impl Sync for Span
impl Unpin for Span
impl UnsafeUnpin for Span
impl UnwindSafe for Span
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.