struct RegistryDependency<'a> {Show 13 fields
name: InternedString,
req: Cow<'a, str>,
features: Vec<InternedString>,
optional: bool,
default_features: bool,
target: Option<Cow<'a, str>>,
kind: Option<Cow<'a, str>>,
registry: Option<Cow<'a, str>>,
package: Option<InternedString>,
public: Option<bool>,
artifact: Option<Vec<Cow<'a, str>>>,
bindep_target: Option<Cow<'a, str>>,
lib: bool,
}
Expand description
A dependency as encoded in the IndexPackage
index JSON.
Fields§
§name: InternedString
Name of the dependency. If the dependency is renamed, the original
would be stored in RegistryDependency::package
.
req: Cow<'a, str>
The SemVer requirement for this dependency.
features: Vec<InternedString>
Set 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<Cow<'a, str>>
The target platform for this dependency.
kind: Option<Cow<'a, str>>
The dependency kind. “dev”, “build”, and “normal”.
registry: Option<Cow<'a, str>>
§package: Option<InternedString>
The original name if the dependency is renamed.
public: Option<bool>
Whether or not this is a public dependency. Unstable. See RFC 1977.
artifact: Option<Vec<Cow<'a, str>>>
§bindep_target: Option<Cow<'a, str>>
§lib: bool
Implementations§
source§impl<'a> RegistryDependency<'a>
impl<'a> RegistryDependency<'a>
sourcepub fn into_dep(self, default: SourceId) -> CargoResult<Dependency>
pub fn into_dep(self, default: SourceId) -> CargoResult<Dependency>
Converts an encoded dependency in the registry to a cargo dependency
Trait Implementations§
source§impl<'de: 'a, 'a> Deserialize<'de> for RegistryDependency<'a>
impl<'de: 'a, 'a> Deserialize<'de> for RegistryDependency<'a>
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>,
Auto Trait Implementations§
impl<'a> RefUnwindSafe for RegistryDependency<'a>
impl<'a> Send for RegistryDependency<'a>
impl<'a> Sync for RegistryDependency<'a>
impl<'a> Unpin for RegistryDependency<'a>
impl<'a> UnwindSafe for RegistryDependency<'a>
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> 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>
impl<T> DeserializeOwned for Twhere T: for<'de> Deserialize<'de>,
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: 240 bytes