Trait git_diff::tree::visit::Visit [−][src]
pub trait Visit { type PathId: Clone + Default; fn set_current_path(&mut self, id: Self::PathId); fn push_tracked_path_component(&mut self, component: &BStr) -> Self::PathId; fn push_path_component(&mut self, component: &BStr); fn pop_path_component(&mut self); fn visit(&mut self, change: Change) -> Action; }
A trait to allow responding to a traversal designed to figure out the changes to turn tree A into tree B.
Associated Types
Loading content...Required methods
fn set_current_path(&mut self, id: Self::PathId)
[src]
Sets the path associated with the given id
so future calls to push and pop components affect it instead.
fn push_tracked_path_component(&mut self, component: &BStr) -> Self::PathId
[src]
Append a component
to the end of a path, which may be empty, and associate it with the returned path id.
fn push_path_component(&mut self, component: &BStr)
[src]
Append a component
to the end of a path, which may be empty.
fn pop_path_component(&mut self)
[src]
Removes the last component from the path, which may leave it empty.
fn visit(&mut self, change: Change) -> Action
[src]
Record a change
and return an instruction whether to continue or not.
The implementation may use the current path to lean where in the tree the change is located.
Implementors
impl Visit for Recorder
[src]
impl Visit for Recorder
[src]