#[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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more