Expand description
A Cargo.toml
specification for a Git branch, tag, or revision.
For more, including examples, see the documentation for ExternalSource::Git
.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Branch(&'g str)
A branch, e.g. "main"
.
This is specified in Cargo.toml
as:
[dependencies]
cargo = { git = "...", branch = "main" }
Tag(&'g str)
A tag, e.g. "guppy-0.5.0"
.
This is specified in Cargo.toml
as:
[dependencies]
guppy = { git = "...", tag = "guppy-0.5.0" }
Rev(&'g str)
A revision (commit hash), e.g. "0227f048fcb7c798026ede6cc20c92befc84c3a4"
.
This is specified in Cargo.toml
as:
[dependencies]
cargo = { git = "...", rev = "0227f048fcb7c798026ede6cc20c92befc84c3a4" }
Default
Not specified in Cargo.toml
. Cargo treats this as the main branch by default.
[dependencies]
cargo = { git = "..." }
Implementations§
source§impl<'g> GitReq<'g>
impl<'g> GitReq<'g>
sourcepub fn to_summary(self) -> GitReqSummary
Available on crate feature summaries
only.
pub fn to_summary(self) -> GitReqSummary
summaries
only.Converts self
into a GitReqSummary
.
Requires the summaries
feature to be enabled.
Trait Implementations§
impl<'g> Copy for GitReq<'g>
impl<'g> Eq for GitReq<'g>
impl<'g> StructuralEq for GitReq<'g>
impl<'g> StructuralPartialEq for GitReq<'g>
Auto Trait Implementations§
impl<'g> RefUnwindSafe for GitReq<'g>
impl<'g> Send for GitReq<'g>
impl<'g> Sync for GitReq<'g>
impl<'g> Unpin for GitReq<'g>
impl<'g> UnwindSafe for GitReq<'g>
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.