pub struct ConfigChange {
pub key: OverrideKey,
pub value: String,
}Expand description
A KEY=VALUE change, parsed and value-validated. The value is kept as the
canonical string it parsed from, so one shape serialises to the overrides
file and re-parses on load through the same validation.
Fields§
§key: OverrideKey§value: StringImplementations§
Source§impl ConfigChange
impl ConfigChange
Sourcepub fn apply_to_agent(&self, agent: &mut AgentConfig) -> Result<()>
pub fn apply_to_agent(&self, agent: &mut AgentConfig) -> Result<()>
Apply onto an crate::config::AgentConfig. The value was validated
at parse time; a value that no longer parses (a hand-edited file) is
an error the caller reports, never a silent skip-and-apply-half.
pub fn spec(&self) -> String
Trait Implementations§
Source§impl Clone for ConfigChange
impl Clone for ConfigChange
Source§fn clone(&self) -> ConfigChange
fn clone(&self) -> ConfigChange
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ConfigChange
impl Debug for ConfigChange
Source§impl PartialEq for ConfigChange
impl PartialEq for ConfigChange
impl StructuralPartialEq for ConfigChange
Auto Trait Implementations§
impl Freeze for ConfigChange
impl RefUnwindSafe for ConfigChange
impl Send for ConfigChange
impl Sync for ConfigChange
impl Unpin for ConfigChange
impl UnsafeUnpin for ConfigChange
impl UnwindSafe for ConfigChange
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