Struct crates_index::Dependency [−][src]
pub struct Dependency { /* fields omitted */ }
Expand description
A single dependency of a specific crate version
Implementations
Returns the name of the crate providing the dependency.
This is equivalent to name()
unless self.package()
is not None
, in which case it’s equal to self.package()
.
Basically, you can define a dependency in your Cargo.toml
like this:
serde_lib = {version = "1", package = "serde"}
…which means that it uses the crate serde
but imports
it under the name serde_lib
.
Trait Implementations
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
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for Dependency
impl Send for Dependency
impl Sync for Dependency
impl Unpin for Dependency
impl UnwindSafe for Dependency
Blanket Implementations
Mutably borrows from an owned value. Read more