pub struct VisualDiff<'a> {
pub before: &'a Document,
pub after: &'a Document,
}Expand description
Visual diff between two YAML documents.
Shows additions, deletions, and modifications between two versions.
§Example
use yaml_edit::{Document, debug::VisualDiff};
use std::str::FromStr;
let before = Document::from_str("name: Alice\nage: 30").unwrap();
let after = Document::from_str("name: Bob\nage: 30").unwrap();
println!("{}", VisualDiff {
before: &before,
after: &after,
});Fields§
§before: &'a DocumentThe original document
after: &'a DocumentThe modified document
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for VisualDiff<'a>
impl<'a> !RefUnwindSafe for VisualDiff<'a>
impl<'a> !Send for VisualDiff<'a>
impl<'a> !Sync for VisualDiff<'a>
impl<'a> Unpin for VisualDiff<'a>
impl<'a> UnsafeUnpin for VisualDiff<'a>
impl<'a> !UnwindSafe for VisualDiff<'a>
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