pub struct Stack { /* private fields */ }
Expand description

A stack of path components with the delegation of side-effects as the currently set path changes, component by component.

Implementations§

Returns the top-level path of the stack.

Returns the absolute path the currently set path.

Returns the currently set path relative to the root().

Create a new instance with root being the base for all future paths we handle, assuming it to be valid which includes symbolic links to be included in it as well.

Set the current stack to point to the relative path and call push_comp() each time a new path component is popped along with the stacks state for inspection to perform an operation that produces some data.

The full path to relative will be returned along with the data returned by push_comp. Note that this only works correctly for the delegate’s push_directory() and pop_directory() methods if relative paths are terminal, so point to their designated file or directory.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.