Struct rustsec::Repository
source · [−]pub struct Repository { /* private fields */ }
Available on crate feature
git
only.Expand description
Git repository for a Rust advisory DB.
Implementations
sourceimpl Repository
impl Repository
sourcepub fn default_path() -> PathBuf
pub fn default_path() -> PathBuf
Location of the default advisory-db
repository for crates.io
sourcepub fn fetch_default_repo() -> Result<Self, Error>
pub fn fetch_default_repo() -> Result<Self, Error>
Fetch the default repository
sourcepub fn fetch<P: Into<PathBuf>>(
url: &str,
into_path: P,
ensure_fresh: bool
) -> Result<Self, Error>
pub fn fetch<P: Into<PathBuf>>(
url: &str,
into_path: P,
ensure_fresh: bool
) -> Result<Self, Error>
Create a new Repository
with the given URL and path
sourcepub fn open<P: Into<PathBuf>>(into_path: P) -> Result<Self, Error>
pub fn open<P: Into<PathBuf>>(into_path: P) -> Result<Self, Error>
Open a repository at the given path
sourcepub fn latest_commit(&self) -> Result<Commit, Error>
pub fn latest_commit(&self) -> Result<Commit, Error>
Get information about the latest commit to the repo
Auto Trait Implementations
impl RefUnwindSafe for Repository
impl Send for Repository
impl !Sync for Repository
impl Unpin for Repository
impl UnwindSafe for Repository
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more