enum RelativeSpanKind<'a> {
Civil {
start: RelativeCivil,
end: RelativeCivil,
},
Zoned {
start: RelativeZoned<'a>,
end: RelativeZoned<'a>,
},
}
Expand description
A civil or zoned datetime range of time.
Variants§
Implementations§
Source§impl<'a> RelativeSpanKind<'a>
impl<'a> RelativeSpanKind<'a>
Sourcefn into_relative_span(self, largest: Unit) -> Result<RelativeSpan<'a>, Error>
fn into_relative_span(self, largest: Unit) -> Result<RelativeSpan<'a>, Error>
Create a balanced RelativeSpan
from this range of time.
§Errors
This returns an error when the span in this range cannot be
represented. In general, this only occurs when asking for largest units
of Unit::Nanosecond
and when the span is too big to fit into a
64-bit nanosecond count.
Trait Implementations§
Source§impl<'a> Clone for RelativeSpanKind<'a>
impl<'a> Clone for RelativeSpanKind<'a>
Source§fn clone(&self) -> RelativeSpanKind<'a>
fn clone(&self) -> RelativeSpanKind<'a>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl<'a> Freeze for RelativeSpanKind<'a>
impl<'a> RefUnwindSafe for RelativeSpanKind<'a>
impl<'a> Send for RelativeSpanKind<'a>
impl<'a> Sync for RelativeSpanKind<'a>
impl<'a> Unpin for RelativeSpanKind<'a>
impl<'a> UnwindSafe for RelativeSpanKind<'a>
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
Mutably borrows from an owned value. Read more