Struct gix_traverse::tree::Recorder

source ·
pub struct Recorder {
    pub records: Vec<Entry>,
    /* private fields */
}
Expand description

A Visit implementation to record every observed change and keep track of the changed paths.

Recorders can also be instructed to track the filename only, or no location at all.

Fields§

§records: Vec<Entry>

The observed entries.

Implementations§

source§

impl Recorder

Builder

source

pub fn track_location(self, location: Option<Location>) -> Self

Obtain a copy of the currently tracked, full path of the entry.

source§

impl Recorder

Access

source

pub fn path_clone(&self) -> BString

Obtain a copy of the currently tracked, full path of the entry.

source

pub fn path(&self) -> &BStr

Return the currently set path.

Trait Implementations§

source§

impl Clone for Recorder

source§

fn clone(&self) -> Recorder

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Recorder

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Recorder

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl Visit for Recorder

source§

fn pop_front_tracked_path_and_set_current(&mut self)

Sets the full path 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_tree(&mut self, entry: &EntryRef<'_>) -> Action

Observe a tree entry that is a tree and return an instruction whether to continue or not. Action::Skip can be used to prevent traversing it, for example if it’s known to the caller already. Read more
source§

fn visit_nontree(&mut self, entry: &EntryRef<'_>) -> Action

Observe a tree entry that is NO tree and return an instruction whether to continue or not. Action::Skip has no effect here. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.