Struct nmstate::NetworkState
source · [−]#[non_exhaustive]pub struct NetworkState {
pub hostname: Option<HostNameState>,
pub dns: DnsState,
pub rules: RouteRules,
pub routes: Routes,
pub interfaces: Interfaces,
pub ovsdb: OvsDbGlobalConfig,
pub prop_list: Vec<&'static str>,
/* private fields */
}Fields (Non-exhaustive)
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.hostname: Option<HostNameState>dns: DnsStaterules: RouteRulesroutes: Routesinterfaces: Interfacesovsdb: OvsDbGlobalConfigprop_list: Vec<&'static str>Implementations
sourceimpl NetworkState
impl NetworkState
pub fn set_kernel_only(&mut self, value: bool) -> &mut Self
pub fn set_verify_change(&mut self, value: bool) -> &mut Self
pub fn set_commit(&mut self, value: bool) -> &mut Self
pub fn set_timeout(&mut self, value: u32) -> &mut Self
pub fn set_include_secrets(&mut self, value: bool) -> &mut Self
pub fn set_include_status_data(&mut self, value: bool) -> &mut Self
pub fn set_running_config_only(&mut self, value: bool) -> &mut Self
pub fn set_memory_only(&mut self, value: bool) -> &mut Self
pub fn new() -> Self
pub fn new_from_json(net_state_json: &str) -> Result<Self, NmstateError>
pub fn append_interface_data(&mut self, iface: Interface)
pub fn retrieve(&mut self) -> Result<&mut Self, NmstateError>
pub fn hide_secrets(&mut self)
pub fn apply(&self) -> Result<(), NmstateError>
pub fn gen_conf(&self) -> Result<HashMap<String, Vec<String>>, NmstateError>
pub fn checkpoint_rollback(checkpoint: &str) -> Result<(), NmstateError>
pub fn checkpoint_commit(checkpoint: &str) -> Result<(), NmstateError>
Trait Implementations
sourceimpl Clone for NetworkState
impl Clone for NetworkState
sourcefn clone(&self) -> NetworkState
fn clone(&self) -> NetworkState
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 more
sourceimpl Debug for NetworkState
impl Debug for NetworkState
sourceimpl Default for NetworkState
impl Default for NetworkState
sourcefn default() -> NetworkState
fn default() -> NetworkState
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for NetworkState
impl<'de> Deserialize<'de> for NetworkState
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<NetworkState> for NetworkState
impl PartialEq<NetworkState> for NetworkState
sourcefn eq(&self, other: &NetworkState) -> bool
fn eq(&self, other: &NetworkState) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &NetworkState) -> bool
fn ne(&self, other: &NetworkState) -> bool
This method tests for !=.
sourceimpl Serialize for NetworkState
impl Serialize for NetworkState
impl Eq for NetworkState
impl StructuralEq for NetworkState
impl StructuralPartialEq for NetworkState
Auto Trait Implementations
impl RefUnwindSafe for NetworkState
impl Send for NetworkState
impl Sync for NetworkState
impl Unpin for NetworkState
impl UnwindSafe for NetworkState
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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<T> NoneValue for T where
T: Default,
impl<T> NoneValue for T where
T: Default,
type NoneType = T
sourcefn null_value() -> T
fn null_value() -> T
The none-equivalent value.