Struct nmstate::InterfaceIpAddr
source · #[non_exhaustive]pub struct InterfaceIpAddr {
pub ip: IpAddr,
pub prefix_length: u8,
pub mptcp_flags: Option<Vec<MptcpAddressFlag>>,
pub valid_life_time: Option<String>,
pub preferred_life_time: Option<String>,
}
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.ip: IpAddr
IP address.
prefix_length: u8
Prefix length.
Serialize and deserialize to/from prefix-length
.
mptcp_flags: Option<Vec<MptcpAddressFlag>>
MPTCP flag on this IP address. Ignored when applying as nmstate does not support support IP address specific MPTCP flags. You should apply MPTCP flags at interface level via [BaseInterface.mptcp].
valid_life_time: Option<String>
Remaining time for IP address been valid. The output format is
“32sec” or “forever”.
This property is query only, it will be ignored when applying.
Serialize to valid-life-time
.
Deserialize from valid-life-time
or valid-left
or valid-lft
.
preferred_life_time: Option<String>
Remaining time for IP address been preferred. The output format is
“32sec” or “forever”.
This property is query only, it will be ignored when applying.
Serialize to preferred-life-time
.
Deserialize from preferred-life-time
or preferred-left
or
preferred-lft
.
Trait Implementations§
source§impl Clone for InterfaceIpAddr
impl Clone for InterfaceIpAddr
source§fn clone(&self) -> InterfaceIpAddr
fn clone(&self) -> InterfaceIpAddr
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for InterfaceIpAddr
impl Debug for InterfaceIpAddr
source§impl Default for InterfaceIpAddr
impl Default for InterfaceIpAddr
source§impl<'de> Deserialize<'de> for InterfaceIpAddr
impl<'de> Deserialize<'de> for InterfaceIpAddr
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl Display for InterfaceIpAddr
impl Display for InterfaceIpAddr
source§impl Ord for InterfaceIpAddr
impl Ord for InterfaceIpAddr
source§fn cmp(&self, other: &InterfaceIpAddr) -> Ordering
fn cmp(&self, other: &InterfaceIpAddr) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for InterfaceIpAddr
impl PartialEq for InterfaceIpAddr
source§fn eq(&self, other: &InterfaceIpAddr) -> bool
fn eq(&self, other: &InterfaceIpAddr) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for InterfaceIpAddr
impl PartialOrd for InterfaceIpAddr
source§fn partial_cmp(&self, other: &InterfaceIpAddr) -> Option<Ordering>
fn partial_cmp(&self, other: &InterfaceIpAddr) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for InterfaceIpAddr
impl Serialize for InterfaceIpAddr
source§impl TryFrom<&str> for InterfaceIpAddr
impl TryFrom<&str> for InterfaceIpAddr
impl Eq for InterfaceIpAddr
impl StructuralPartialEq for InterfaceIpAddr
Auto Trait Implementations§
impl Freeze for InterfaceIpAddr
impl RefUnwindSafe for InterfaceIpAddr
impl Send for InterfaceIpAddr
impl Sync for InterfaceIpAddr
impl Unpin for InterfaceIpAddr
impl UnwindSafe for InterfaceIpAddr
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
source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.