Struct rustsec::repository::git::GitPath
source · pub struct GitPath<'a> { /* private fields */ }
Available on crate feature
osv-export
only.Expand description
A path relative to the root of the git repository that is guaranteed to be tracked by Git.
This type is immutable.
Implementations§
source§impl<'a> GitPath<'a>
impl<'a> GitPath<'a>
sourcepub fn new(repo: &'a Repository, path: &'a Path) -> Result<Self, Error>
pub fn new(repo: &'a Repository, path: &'a Path) -> Result<Self, Error>
Creates a new GitPath
, validating that this file is tracked in Git
sourcepub fn path(&self) -> &'a Path
pub fn path(&self) -> &'a Path
A path relative to the root of the git repository that is guaranteed to be tracked by Git
sourcepub fn repository(&self) -> &'a Repository
pub fn repository(&self) -> &'a Repository
The git repository the path is tracked by