#[non_exhaustive]pub struct DependencySpec {Show 13 fields
pub package: Option<String>,
pub version: Option<String>,
pub path: Option<String>,
pub registry: Option<String>,
pub registry_index: Option<String>,
pub git: Option<String>,
pub rev: Option<String>,
pub branch: Option<String>,
pub tag: Option<String>,
pub optional: Option<bool>,
pub default_features: Option<bool>,
pub features: Vec<String>,
pub workspace: bool,
}Expand description
Written dependency constraints, not evidence of activation or source provenance.
Optional flags retain the distinction between omission and an explicit value. Cargo version requirements are validated without allocation and retain their written spelling. Git selectors remain declarations, not resolved commits.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.package: Option<String>Renamed package, when explicitly declared.
version: Option<String>Written version requirement.
path: Option<String>Path relative to the declaring manifest.
registry: Option<String>Named registry; resolving Cargo configuration is a separate operation.
registry_index: Option<String>Explicit registry index, when supplied.
git: Option<String>Git repository spelling.
rev: Option<String>Git revision selector, which need not be a complete commit hash.
branch: Option<String>Git branch selector.
tag: Option<String>Git tag selector.
optional: Option<bool>Explicit optional-dependency setting.
default_features: Option<bool>Explicit default-feature setting.
features: Vec<String>Requested features, without computing feature unification.
workspace: boolWhether this entry inherits from workspace.dependencies.
Trait Implementations§
Source§impl Clone for DependencySpec
impl Clone for DependencySpec
Source§impl Debug for DependencySpec
impl Debug for DependencySpec
Source§impl Default for DependencySpec
impl Default for DependencySpec
impl Eq for DependencySpec
Source§impl PartialEq for DependencySpec
impl PartialEq for DependencySpec
impl StructuralPartialEq for DependencySpec
Auto Trait Implementations§
impl Forget for DependencySpec
impl Freeze for DependencySpec
impl Move for DependencySpec
impl RefUnwindSafe for DependencySpec
impl Send for DependencySpec
impl Sync for DependencySpec
impl Unpin for DependencySpec
impl UnsafeUnpin for DependencySpec
impl UnwindSafe for DependencySpec
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§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
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
key and return true if they are equal.impl<T> EvidenceLease for T
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> ⓘ
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> ⓘ
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