pub enum NonZeroTimeValue {
Finite(NonZeroOrMaxU32),
Infinity,
}
Expand description
A representation of time values for lifetimes to relay the fact that zero is
not a valid time value, and that Infinity
has special significance, as
described in RFC 8415, section
14.2 and section 7.7.
Variants§
Finite(NonZeroOrMaxU32)
The value is set to a value greater than 0 and less than Infinity
.
Infinity
u32::MAX
representing Infinity
, as described in
RFC 8415, section 7.7.
Trait Implementations§
Source§impl Clone for NonZeroTimeValue
impl Clone for NonZeroTimeValue
Source§fn clone(&self) -> NonZeroTimeValue
fn clone(&self) -> NonZeroTimeValue
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 moreSource§impl Debug for NonZeroTimeValue
impl Debug for NonZeroTimeValue
Source§impl From<NonZeroTimeValue> for TimeValue
impl From<NonZeroTimeValue> for TimeValue
Source§fn from(v: NonZeroTimeValue) -> TimeValue
fn from(v: NonZeroTimeValue) -> TimeValue
Converts to this type from the input type.
Source§impl Ord for NonZeroTimeValue
impl Ord for NonZeroTimeValue
Source§fn cmp(&self, other: &NonZeroTimeValue) -> Ordering
fn cmp(&self, other: &NonZeroTimeValue) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for NonZeroTimeValue
impl PartialEq for NonZeroTimeValue
Source§impl PartialOrd for NonZeroTimeValue
impl PartialOrd for NonZeroTimeValue
impl Copy for NonZeroTimeValue
impl Eq for NonZeroTimeValue
impl StructuralPartialEq for NonZeroTimeValue
Auto Trait Implementations§
impl Freeze for NonZeroTimeValue
impl RefUnwindSafe for NonZeroTimeValue
impl Send for NonZeroTimeValue
impl Sync for NonZeroTimeValue
impl Unpin for NonZeroTimeValue
impl UnwindSafe for NonZeroTimeValue
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)