#[non_exhaustive]pub struct GitSource {
pub git: String,
pub branch: Option<String>,
pub tag: Option<String>,
pub rev: Option<String>,
pub version: Option<String>,
}
Expand description
Dependency from a git repo.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.git: String
Repository URL.
branch: Option<String>
Select specific branch.
tag: Option<String>
Select specific tag.
rev: Option<String>
Select specific rev.
version: Option<String>
Version requirement for when published.
Implementations§
source§impl GitSource
impl GitSource
sourcepub fn set_branch(self, branch: impl Into<String>) -> Self
pub fn set_branch(self, branch: impl Into<String>) -> Self
Specify an optional branch.
sourcepub fn source_id(&self) -> CargoResult<SourceId>
pub fn source_id(&self) -> CargoResult<SourceId>
Get the SourceID for this dependency.
fn git_ref(&self) -> GitReference
sourcepub fn set_version(self, version: impl AsRef<str>) -> Self
pub fn set_version(self, version: impl AsRef<str>) -> Self
Set an optional version requirement.
Trait Implementations§
source§impl PartialEq<GitSource> for GitSource
impl PartialEq<GitSource> for GitSource
impl Eq for GitSource
impl StructuralEq for GitSource
impl StructuralPartialEq for GitSource
Auto Trait Implementations§
impl RefUnwindSafe for GitSource
impl Send for GitSource
impl Sync for GitSource
impl Unpin for GitSource
impl UnwindSafe for GitSource
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
§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,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§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,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.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> 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: 120 bytes