Enum cargo_manifest::Dependency
source · pub enum Dependency {
Simple(String),
Inherited(InheritedDependencyDetail),
Detailed(DependencyDetail),
}
Variants§
Implementations§
source§impl Dependency
impl Dependency
pub fn detail(&self) -> Option<&DependencyDetail>
sourcepub fn simplify(self) -> Self
pub fn simplify(self) -> Self
Simplifies Dependency::Detailed
to Dependency::Simple
if only the
version
field inside the DependencyDetail
struct is set.
pub fn req(&self) -> &str
pub fn req_features(&self) -> &[String]
pub fn optional(&self) -> bool
pub fn package(&self) -> Option<&str>
pub fn git(&self) -> Option<&str>
pub fn is_crates_io(&self) -> bool
Trait Implementations§
source§impl Clone for Dependency
impl Clone for Dependency
source§fn clone(&self) -> Dependency
fn clone(&self) -> Dependency
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 Debug for Dependency
impl Debug for Dependency
source§impl<'de> Deserialize<'de> for Dependency
impl<'de> Deserialize<'de> for Dependency
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
source§impl PartialEq for Dependency
impl PartialEq for Dependency
source§fn eq(&self, other: &Dependency) -> bool
fn eq(&self, other: &Dependency) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for Dependency
impl Serialize for Dependency
impl Eq for Dependency
impl StructuralPartialEq for Dependency
Auto Trait Implementations§
impl Freeze for Dependency
impl RefUnwindSafe for Dependency
impl Send for Dependency
impl Sync for Dependency
impl Unpin for Dependency
impl UnwindSafe for Dependency
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
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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
Compare self to
key
and return true
if they are equal.