Enum packet_formats_dhcp::v6::NonZeroTimeValue
source · 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§fn eq(&self, other: &NonZeroTimeValue) -> bool
fn eq(&self, other: &NonZeroTimeValue) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for NonZeroTimeValue
impl PartialOrd for NonZeroTimeValue
source§fn partial_cmp(&self, other: &NonZeroTimeValue) -> Option<Ordering>
fn partial_cmp(&self, other: &NonZeroTimeValue) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl 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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
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
)