gix_diff::tree

Trait Visit

Source
pub trait Visit {
    // Required methods
    fn pop_front_tracked_path_and_set_current(&mut self);
    fn push_back_tracked_path_component(&mut self, component: &BStr);
    fn push_path_component(&mut self, component: &BStr);
    fn pop_path_component(&mut self);
    fn visit(&mut self, change: Change) -> Action;
}
Expand description

A trait to allow responding to a traversal designed to figure out the changes to turn tree A into tree B.

Required Methods§

Source

fn pop_front_tracked_path_and_set_current(&mut self)

Sets the full path in front of the queue so future calls to push and pop components affect it instead.

Source

fn push_back_tracked_path_component(&mut self, component: &BStr)

Append a component to the end of a path, which may be empty.

Source

fn push_path_component(&mut self, component: &BStr)

Append a component to the end of a path, which may be empty.

Source

fn pop_path_component(&mut self)

Removes the last component from the path, which may leave it empty.

Source

fn visit(&mut self, change: Change) -> Action

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§