Struct nmstate::RouteRules
source · #[non_exhaustive]pub struct RouteRules {
pub config: Option<Vec<RouteRuleEntry>>,
}
Expand description
Routing rules
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.config: Option<Vec<RouteRuleEntry>>
When applying, None
means preserve existing route rules.
Nmstate is using partial editing for route rule, which means
desired route rules only append to existing instead of overriding.
To delete any route rule, please set [crate::RouteRuleEntry.state] to
RouteRuleState::Absent. Any property set to None in absent route rule
means wildcard. For example, this crate::NetworkState will delete all
route rule looking up route table 500:
---
route-rules:
config:
- state: absent
route-table: 500
Implementations§
Trait Implementations§
source§impl Clone for RouteRules
impl Clone for RouteRules
source§fn clone(&self) -> RouteRules
fn clone(&self) -> RouteRules
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 RouteRules
impl Debug for RouteRules
source§impl Default for RouteRules
impl Default for RouteRules
source§fn default() -> RouteRules
fn default() -> RouteRules
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for RouteRules
impl<'de> Deserialize<'de> for RouteRules
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>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for RouteRules
impl PartialEq for RouteRules
source§impl Serialize for RouteRules
impl Serialize for RouteRules
impl Eq for RouteRules
impl StructuralPartialEq for RouteRules
Auto Trait Implementations§
impl Freeze for RouteRules
impl RefUnwindSafe for RouteRules
impl Send for RouteRules
impl Sync for RouteRules
impl Unpin for RouteRules
impl UnwindSafe for RouteRules
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§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
)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
Compare self to
key
and return true
if they are equal.