pub struct ConfigDiff {
pub changed_fields: Vec<String>,
pub requires_restart: bool,
}Expand description
Configuration change details
Fields§
§changed_fields: Vec<String>Fields that changed
requires_restart: boolWhether the change requires a restart
Implementations§
Source§impl ConfigDiff
impl ConfigDiff
Sourcepub fn compare(old: &Config, new: &Config) -> Self
pub fn compare(old: &Config, new: &Config) -> Self
Compare two configurations and return the differences
Sourcepub fn has_changes(&self) -> bool
pub fn has_changes(&self) -> bool
Check if there are any changes
Sourcepub fn change_count(&self) -> usize
pub fn change_count(&self) -> usize
Get the number of changed fields
Sourcepub fn field_changed(&self, field: &str) -> bool
pub fn field_changed(&self, field: &str) -> bool
Check if a specific field changed
Trait Implementations§
Source§impl Clone for ConfigDiff
impl Clone for ConfigDiff
Source§fn clone(&self) -> ConfigDiff
fn clone(&self) -> ConfigDiff
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 ConfigDiff
impl Debug for ConfigDiff
Source§impl Default for ConfigDiff
impl Default for ConfigDiff
Source§impl PartialEq for ConfigDiff
impl PartialEq for ConfigDiff
impl StructuralPartialEq for ConfigDiff
Auto Trait Implementations§
impl Freeze for ConfigDiff
impl RefUnwindSafe for ConfigDiff
impl Send for ConfigDiff
impl Sync for ConfigDiff
impl Unpin for ConfigDiff
impl UnsafeUnpin for ConfigDiff
impl UnwindSafe for ConfigDiff
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