pub struct ConfigPatch<P: Prefix> {
pub modifiers: Vec<ConfigModifier<P>>,
}Expand description
§Config Patch
A series of ConfigModifiers which can be applied on a Config to get a new Config. The
series is an ordered list, and the modifiers are applied in the order they were added.
Fields§
§modifiers: Vec<ConfigModifier<P>>List of all modifiers, in the order in which they are applied.
Implementations§
Source§impl<P: Prefix> ConfigPatch<P>
impl<P: Prefix> ConfigPatch<P>
Sourcepub fn add(&mut self, modifier: ConfigModifier<P>)
pub fn add(&mut self, modifier: ConfigModifier<P>)
Add a new modifier to the patch
Trait Implementations§
Source§impl<P: Clone + Prefix> Clone for ConfigPatch<P>
impl<P: Clone + Prefix> Clone for ConfigPatch<P>
Source§fn clone(&self) -> ConfigPatch<P>
fn clone(&self) -> ConfigPatch<P>
Returns a duplicate 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<P: Prefix> Default for ConfigPatch<P>
impl<P: Prefix> Default for ConfigPatch<P>
Source§impl<'de, P> Deserialize<'de> for ConfigPatch<P>where
P: for<'a> Deserialize<'a> + Prefix,
impl<'de, P> Deserialize<'de> for ConfigPatch<P>where
P: for<'a> Deserialize<'a> + Prefix,
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<'n, P: Prefix, Q, Ospf: OspfImpl> NetworkFormatter<'n, P, Q, Ospf> for ConfigPatch<P>
impl<'n, P: Prefix, Q, Ospf: OspfImpl> NetworkFormatter<'n, P, Q, Ospf> for ConfigPatch<P>
Source§impl<P> Serialize for ConfigPatch<P>
impl<P> Serialize for ConfigPatch<P>
impl<P: Prefix> StructuralPartialEq for ConfigPatch<P>
Auto Trait Implementations§
impl<P> Freeze for ConfigPatch<P>
impl<P> RefUnwindSafe for ConfigPatch<P>
impl<P> Send for ConfigPatch<P>
impl<P> Sync for ConfigPatch<P>
impl<P> Unpin for ConfigPatch<P>
impl<P> UnwindSafe for ConfigPatch<P>
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§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more