pub struct ConfigDiff { /* private fields */ }Expand description
Configuration diff result
Contains all detected changes between desired and current configuration.
§Example
use lmrc_postgres::ConfigDiff;
if diff.has_changes() {
println!("Configuration changes detected:");
for change in diff.changes() {
println!(" {}", change);
}
}Implementations§
Source§impl ConfigDiff
impl ConfigDiff
Sourcepub fn add_change(&mut self, change: ConfigChange)
pub fn add_change(&mut self, change: ConfigChange)
Add a change to the diff
Sourcepub fn has_changes(&self) -> bool
pub fn has_changes(&self) -> bool
Check if there are any changes
Sourcepub fn changes(&self) -> &[ConfigChange]
pub fn changes(&self) -> &[ConfigChange]
Get all changes
Sourcepub fn changes_by_type(&self, change_type: ChangeType) -> Vec<&ConfigChange>
pub fn changes_by_type(&self, change_type: ChangeType) -> Vec<&ConfigChange>
Get changes by type
Sourcepub fn additions(&self) -> Vec<&ConfigChange>
pub fn additions(&self) -> Vec<&ConfigChange>
Get additions
Sourcepub fn modifications(&self) -> Vec<&ConfigChange>
pub fn modifications(&self) -> Vec<&ConfigChange>
Get modifications
Sourcepub fn removals(&self) -> Vec<&ConfigChange>
pub fn removals(&self) -> Vec<&ConfigChange>
Get removals
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
Auto Trait Implementations§
impl Freeze for ConfigDiff
impl RefUnwindSafe for ConfigDiff
impl Send for ConfigDiff
impl Sync for ConfigDiff
impl Unpin 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