Skip to main content

Inspector

Trait Inspector 

Source
pub trait Inspector {
    // Required methods
    fn describe(&self, opts: Option<&DescribeOptions>) -> AppResult<String>;
    fn rev_parse(&self, revision: &str) -> AppResult<Oid>;
    fn grep(
        &self,
        pattern: &str,
        revision: &str,
        opts: Option<&GrepOptions>,
    ) -> AppResult<Vec<GrepMatch>>;
    fn show(&self, object: &str) -> AppResult<Vec<u8>>;
}
Expand description

Read-only advanced inspection helpers.

Required Methods§

Source

fn describe(&self, opts: Option<&DescribeOptions>) -> AppResult<String>

Describes the current revision in a human-readable form.

Source

fn rev_parse(&self, revision: &str) -> AppResult<Oid>

Resolves a revision expression to an object ID.

Source

fn grep( &self, pattern: &str, revision: &str, opts: Option<&GrepOptions>, ) -> AppResult<Vec<GrepMatch>>

Searches tracked content for pattern matches.

Source

fn show(&self, object: &str) -> AppResult<Vec<u8>>

Returns raw object content for a revision expression.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§