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,
gctx: &GlobalContext,
) -> CargoResult<(GitDatabase, Oid)>
pub fn checkout( &self, into: &Path, db: Option<GitDatabase>, reference: &GitReference, gctx: &GlobalContext, ) -> 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.
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§
impl StructuralPartialEq for GitRemote
Auto Trait Implementations§
impl Freeze for GitRemote
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> Serialize for T
impl<T> Serialize for T
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<(), Error>
fn do_erased_serialize( &self, serializer: &mut dyn Serializer, ) -> Result<(), ErrorImpl>
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§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>,
§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