pub struct ConfigChange {
pub field: String,
pub old_value: String,
pub new_value: String,
}Expand description
Represents a single configuration change with old and new values
This type is used to track individual field changes when comparing configurations, making it easy to log, audit, or display what changed during a configuration update.
§Examples
use chie_shared::ConfigChange;
// Track a simple numeric change
let change = ConfigChange::new("max_connections", &100, &200);
assert_eq!(change.field, "max_connections");
assert_eq!(change.old_value, "100");
assert_eq!(change.new_value, "200");
// Track a boolean change
let change = ConfigChange::new("enable_relay", &true, &false);
assert_eq!(change.old_value, "true");
assert_eq!(change.new_value, "false");Fields§
§field: StringField name that changed
old_value: StringOld value (serialized as string)
new_value: StringNew value (serialized as string)
Implementations§
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 · 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<'de> Deserialize<'de> for ConfigChange
impl<'de> Deserialize<'de> for ConfigChange
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 ConfigChange
impl PartialEq for ConfigChange
Source§impl Serialize for ConfigChange
impl Serialize 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 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