Enum PreferredLifetimeInfo
pub enum PreferredLifetimeInfo {
PreferredUntil(i64),
Deprecated(Empty),
}
Expand description
Information about the preferred lifetime of an IP address or delegated prefix.
Variants§
PreferredUntil(i64)
The end of the preferred lifetime.
The address/prefix should not be considered deprecated if zx.Time
is in the past. preferred_until
is exchanged as a means to inform
the deadline where deprecation is expected to happen.
The preferred lifetime of addresses is defined in RFC 4862, section 2.
Addresses configured using a delegated prefix must have a preferred lifetime no longer than that of the prefix according to RFC 8415, section 6.3.
Must be greater than 0. If zx.Time.INFINITE
, the preferred lifetime
does not expire.
Deprecated(Empty)
The address/prefix is deprecated.
Deprecated addresses should no longer be used for initiating new connections unless explicitly requested, or if no other non-deprecated addresses are assigned (as described in RFC 4862, section 1).
Addresses configured using a deprecated delegated prefix must also be deprecated according to RFC 8415, section 6.3.
An address/prefix can become undeprecated if its preferred lifetime is extended.
Implementations§
§impl PreferredLifetimeInfo
impl PreferredLifetimeInfo
pub fn ordinal(&self) -> u64
pub fn is_unknown(&self) -> bool
is_unknown
Trait Implementations§
§impl Clone for PreferredLifetimeInfo
impl Clone for PreferredLifetimeInfo
§fn clone(&self) -> PreferredLifetimeInfo
fn clone(&self) -> PreferredLifetimeInfo
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more§impl Debug for PreferredLifetimeInfo
impl Debug for PreferredLifetimeInfo
§impl<D> Decode<PreferredLifetimeInfo, D> for PreferredLifetimeInfowhere
D: ResourceDialect,
impl<D> Decode<PreferredLifetimeInfo, D> for PreferredLifetimeInfowhere
D: ResourceDialect,
§fn new_empty() -> PreferredLifetimeInfo
fn new_empty() -> PreferredLifetimeInfo
Self
. The specific value does not matter,
since it will be overwritten by decode
.§impl<D> Encode<PreferredLifetimeInfo, D> for &PreferredLifetimeInfowhere
D: ResourceDialect,
impl<D> Encode<PreferredLifetimeInfo, D> for &PreferredLifetimeInfowhere
D: ResourceDialect,
§impl Hash for PreferredLifetimeInfo
impl Hash for PreferredLifetimeInfo
§impl Ord for PreferredLifetimeInfo
impl Ord for PreferredLifetimeInfo
§fn cmp(&self, other: &PreferredLifetimeInfo) -> Ordering
fn cmp(&self, other: &PreferredLifetimeInfo) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
§impl PartialEq for PreferredLifetimeInfo
impl PartialEq for PreferredLifetimeInfo
§impl PartialOrd for PreferredLifetimeInfo
impl PartialOrd for PreferredLifetimeInfo
§impl TypeMarker for PreferredLifetimeInfo
impl TypeMarker for PreferredLifetimeInfo
§type Owned = PreferredLifetimeInfo
type Owned = PreferredLifetimeInfo
§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
inline_align
.§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned
to a single memcpy. Read more§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned
to a single memcpy.§impl ValueTypeMarker for PreferredLifetimeInfo
impl ValueTypeMarker for PreferredLifetimeInfo
§type Borrowed<'a> = &'a PreferredLifetimeInfo
type Borrowed<'a> = &'a PreferredLifetimeInfo
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read more§fn borrow(
value: &<PreferredLifetimeInfo as TypeMarker>::Owned,
) -> <PreferredLifetimeInfo as ValueTypeMarker>::Borrowed<'_>
fn borrow( value: &<PreferredLifetimeInfo as TypeMarker>::Owned, ) -> <PreferredLifetimeInfo as ValueTypeMarker>::Borrowed<'_>
&Self::Owned
to Self::Borrowed
.