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§
source§impl 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