pub struct RegistryDependency<'a> {Show 13 fields
pub name: InternedString,
pub req: Cow<'a, str>,
pub features: Vec<InternedString>,
pub optional: bool,
pub default_features: bool,
pub target: Option<Cow<'a, str>>,
pub kind: Option<Cow<'a, str>>,
pub registry: Option<Cow<'a, str>>,
pub package: Option<InternedString>,
pub public: Option<bool>,
pub artifact: Option<Vec<Cow<'a, str>>>,
pub bindep_target: Option<Cow<'a, str>>,
pub 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<'a> Clone for RegistryDependency<'a>
impl<'a> Clone for RegistryDependency<'a>
Source§fn clone(&self) -> RegistryDependency<'a>
fn clone(&self) -> RegistryDependency<'a>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§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> Freeze for RegistryDependency<'a>
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> Serialize for T
impl<T> Serialize for T
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<(), Error>
fn do_erased_serialize( &self, serializer: &mut dyn Serializer, ) -> Result<(), ErrorImpl>
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§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>,
§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: 208 bytes