Struct cargo::sources::git::GitDatabase
source · pub struct GitDatabase { /* private fields */ }
Expand description
A local clone of a remote repository’s database. Multiple GitCheckout
s
can be cloned from a single GitDatabase
.
Implementations§
source§impl GitDatabase
impl GitDatabase
sourcepub fn copy_to(
&self,
rev: Oid,
dest: &Path,
cargo_config: &Config
) -> CargoResult<GitCheckout<'_>>
pub fn copy_to( &self, rev: Oid, dest: &Path, cargo_config: &Config ) -> CargoResult<GitCheckout<'_>>
Checkouts to a revision at dest
ination from this database.
sourcepub fn to_short_id(&self, revision: Oid) -> CargoResult<GitShortID>
pub fn to_short_id(&self, revision: Oid) -> CargoResult<GitShortID>
Get a short OID for a revision
, usually 7 chars or more if ambiguous.
sourcepub fn contains(&self, oid: Oid) -> bool
pub fn contains(&self, oid: Oid) -> bool
Checks if the database contains the object of this oid
..
sourcepub fn resolve(&self, r: &GitReference) -> CargoResult<Oid>
pub fn resolve(&self, r: &GitReference) -> CargoResult<Oid>
GitReference::resolve
s this reference with this database.
Auto Trait Implementations§
impl RefUnwindSafe for GitDatabase
impl Send for GitDatabase
impl !Sync for GitDatabase
impl Unpin for GitDatabase
impl UnwindSafe for GitDatabase
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