Struct reg_index::IndexDependency
source · #[non_exhaustive]pub struct IndexDependency {
pub name: String,
pub req: VersionReq,
pub features: Vec<String>,
pub optional: bool,
pub default_features: bool,
pub target: Option<String>,
pub kind: DependencyKind,
pub registry: Option<Url>,
pub package: Option<String>,
}
Expand description
A dependency of a package.
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.name: String
Name of the dependency.
If the dependency is renamed from the original package name,
this is the new name. The original package name is stored in
the package
field.
req: VersionReq
The semver requirement for this dependency.
features: Vec<String>
List of features enabled for this dependency.
optional: bool
Whether or not this is an optional dependency.
default_features: bool
Whether or not default features are enabled.
target: Option<String>
The target platform for the dependency.
kind: DependencyKind
The dependency kind.
registry: Option<Url>
The URL of the index of the registry where this dependency is from.
If not specified or null, it is assumed the dependency is in the current registry.
package: Option<String>
If the dependency is renamed, this is a string of the actual package name. If None, this dependency is not renamed.
Trait Implementations§
source§impl Clone for IndexDependency
impl Clone for IndexDependency
source§fn clone(&self) -> IndexDependency
fn clone(&self) -> IndexDependency
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<'de> Deserialize<'de> for IndexDependency
impl<'de> Deserialize<'de> for IndexDependency
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl RefUnwindSafe for IndexDependency
impl Send for IndexDependency
impl Sync for IndexDependency
impl Unpin for IndexDependency
impl UnwindSafe for IndexDependency
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