pub struct DiffResult { /* private fields */ }Expand description
Result of diffing two structures
Implementations§
Source§impl DiffResult
impl DiffResult
pub fn new() -> Self
pub fn is_empty(&self) -> bool
pub fn push(&mut self, entry: DiffEntry)
pub fn push_added(&mut self, right: Id<SymbolRecord<'static>>)
pub fn push_removed(&mut self, left: Id<SymbolRecord<'static>>)
pub fn push_replaced( &mut self, left: Id<SymbolRecord<'static>>, right: Id<SymbolRecord<'static>>, detail: ReplaceDetail, )
pub fn push_same( &mut self, left: Id<SymbolRecord<'static>>, right: Id<SymbolRecord<'static>>, )
Sourcepub fn same(&self) -> impl Iterator<Item = &DiffEntry> + Clone
pub fn same(&self) -> impl Iterator<Item = &DiffEntry> + Clone
List of nodes that remain same. This nodes should have same signature, body hash and childs but may have different parent nodes.
Sourcepub fn all_changes(&self) -> impl Iterator<Item = &DiffEntry> + Clone
pub fn all_changes(&self) -> impl Iterator<Item = &DiffEntry> + Clone
List of nodes that cannot be matched in old and new structures. It will contain full list of removed, added or replaced nodes.
This can be false positive, if signature or content hash was changed.
Sourcepub fn replaced(&self) -> impl Iterator<Item = &DiffEntry> + Clone
pub fn replaced(&self) -> impl Iterator<Item = &DiffEntry> + Clone
List of nodes that was changed, but filter only those that was matched in old and new structures.
Sourcepub fn added(&self) -> impl Iterator<Item = &DiffEntry> + Clone
pub fn added(&self) -> impl Iterator<Item = &DiffEntry> + Clone
List nodes that was added in new structure.
Sourcepub fn removed(&self) -> impl Iterator<Item = &DiffEntry> + Clone
pub fn removed(&self) -> impl Iterator<Item = &DiffEntry> + Clone
List nodes that was removed in new structure.
pub fn entries(&self) -> impl Iterator<Item = &DiffEntry> + Clone
Trait Implementations§
Source§impl Clone for DiffResult
impl Clone for DiffResult
Source§fn clone(&self) -> DiffResult
fn clone(&self) -> DiffResult
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 DiffResult
impl Debug for DiffResult
Source§impl FromIterator<DiffEntry> for DiffResult
impl FromIterator<DiffEntry> for DiffResult
Auto Trait Implementations§
impl Freeze for DiffResult
impl RefUnwindSafe for DiffResult
impl Send for DiffResult
impl Sync for DiffResult
impl Unpin for DiffResult
impl UnsafeUnpin for DiffResult
impl UnwindSafe for DiffResult
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