Struct nmstate::Interfaces
source · #[non_exhaustive]pub struct Interfaces { /* private fields */ }
Expand description
Represent a list of Interface with special serde::Deserializer and serde::Serializer. When applying complex nested interface(e.g. bridge over bond over vlan of eth1), the supported maximum nest level is 4 like previous example. For 5+ nested level, you need to place controller interface before its ports.
Implementations
sourceimpl Interfaces
impl Interfaces
sourcepub fn new() -> Self
pub fn new() -> Self
Create empty Interfaces.
pub fn is_empty(&self) -> bool
sourcepub fn get_iface<'a, 'b>(
&'a self,
iface_name: &'b str,
iface_type: InterfaceType
) -> Option<&'a Interface>
pub fn get_iface<'a, 'b>(
&'a self,
iface_name: &'b str,
iface_type: InterfaceType
) -> Option<&'a Interface>
Search interface base on interface name and interface type. When using InterfaceType::Unknown, we only search kernel interface(which has presentation in kernel space).
sourcepub fn set_up_priority(&mut self) -> Result<(), NmstateError>
pub fn set_up_priority(&mut self) -> Result<(), NmstateError>
TODO: this is internal function.
sourceimpl Interfaces
impl Interfaces
Trait Implementations
sourceimpl Clone for Interfaces
impl Clone for Interfaces
sourcefn clone(&self) -> Interfaces
fn clone(&self) -> Interfaces
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for Interfaces
impl Debug for Interfaces
sourceimpl Default for Interfaces
impl Default for Interfaces
sourcefn default() -> Interfaces
fn default() -> Interfaces
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for Interfaces
impl<'de> Deserialize<'de> for Interfaces
sourcefn 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>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl PartialEq<Interfaces> for Interfaces
impl PartialEq<Interfaces> for Interfaces
sourcefn eq(&self, other: &Interfaces) -> bool
fn eq(&self, other: &Interfaces) -> bool
sourceimpl Serialize for Interfaces
impl Serialize for Interfaces
impl Eq for Interfaces
impl StructuralEq for Interfaces
impl StructuralPartialEq for Interfaces
Auto Trait Implementations
impl RefUnwindSafe for Interfaces
impl Send for Interfaces
impl Sync for Interfaces
impl Unpin for Interfaces
impl UnwindSafe for Interfaces
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.sourceimpl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
sourcefn null_value() -> T
fn null_value() -> T
The none-equivalent value.