pub struct GitRemote {
url: Url,
}
Expand description
A remote repository. It gets cloned into a local GitDatabase
.
Fields§
§url: Url
URL to a remote repository.
Implementations§
source§impl GitRemote
impl GitRemote
sourcepub fn checkout(
&self,
into: &Path,
db: Option<GitDatabase>,
reference: &GitReference,
locked_rev: Option<Oid>,
cargo_config: &Config
) -> CargoResult<(GitDatabase, Oid)>
pub fn checkout( &self, into: &Path, db: Option<GitDatabase>, reference: &GitReference, locked_rev: Option<Oid>, cargo_config: &Config ) -> CargoResult<(GitDatabase, Oid)>
Fetches and checkouts to a reference or a revision from this remote into a local path.
This ensures that it gets the up-to-date commit when a named reference is given (tag, branch, refs/*). Thus, network connection is involved.
When locked_rev
is provided, it takes precedence over reference
.
If we have a previous instance of GitDatabase
then fetch into that
if we can. If that can successfully load our revision then we’ve
populated the database with the latest version of reference
, so
return that database and the rev we resolve to.
sourcepub fn db_at(&self, db_path: &Path) -> CargoResult<GitDatabase>
pub fn db_at(&self, db_path: &Path) -> CargoResult<GitDatabase>
Creates a GitDatabase
of this remote at db_path
.
Trait Implementations§
source§impl PartialEq<GitRemote> for GitRemote
impl PartialEq<GitRemote> for GitRemote
impl StructuralPartialEq for GitRemote
Auto Trait Implementations§
impl RefUnwindSafe for GitRemote
impl Send for GitRemote
impl Sync for GitRemote
impl Unpin for GitRemote
impl UnwindSafe for GitRemote
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> Serialize for Twhere
T: Serialize + ?Sized,
impl<T> Serialize for Twhere T: Serialize + ?Sized,
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<Ok, Error>
source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,
source§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 88 bytes