#[non_exhaustive]pub enum GitReq<'g> {
Branch(&'g str),
Tag(&'g str),
Rev(&'g str),
Default,
}
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 = "..." }
Trait Implementations§
impl<'g> Copy for GitReq<'g>
impl<'g> Eq for GitReq<'g>
impl<'g> StructuralPartialEq for GitReq<'g>
Auto Trait Implementations§
impl<'g> Freeze for GitReq<'g>
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<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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.