Trait gix_fs::stack::Delegate

source ·
pub trait Delegate {
    // Required methods
    fn push_directory(&mut self, stack: &Stack) -> Result<()>;
    fn push(&mut self, is_last_component: bool, stack: &Stack) -> Result<()>;
    fn pop_directory(&mut self);
}
Expand description

A delegate for use in a Stack.

Required Methods§

source

fn push_directory(&mut self, stack: &Stack) -> Result<()>

Called whenever we push a directory on top of the stack, after the fact.

It is also called if the currently acted on path is a directory in itself. Use stack.current() to see the directory.

source

fn push(&mut self, is_last_component: bool, stack: &Stack) -> Result<()>

Called after any component was pushed, with the path available at stack.current().

is_last_component is true if the path is completely built.

source

fn pop_directory(&mut self)

Called right after a directory-component was popped off the stack.

Use it to pop information off internal data structures.

Implementors§