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
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for GitPath<'a>
impl<'a> !Send for GitPath<'a>
impl<'a> !Sync for GitPath<'a>
impl<'a> Unpin for GitPath<'a>
impl<'a> !UnwindSafe for GitPath<'a>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more