[][src]Struct cargo_workspace2::cargo::Dependency

pub struct Dependency {
    pub name: String,
    pub alias: Option<String>,
    pub version: Option<String>,
    pub path: Option<String>,
}

An intra-workspace dependency

In a Cargo.toml file these are expressed as paths, and sometimes also as versions.

[dependencies]
my-other-crate = { version = "0.1.0", path = "../other-crate" }

Fields

name: Stringalias: Option<String>version: Option<String>path: Option<String>

Implementations

impl Dependency[src]

pub fn has_version(&self) -> bool[src]

Check if the dependency has a provided version

pub fn has_path(&self) -> bool[src]

Check if the dependency has a provided path

pub fn alias(&self) -> Option<String>[src]

Trait Implementations

impl Clone for Dependency[src]

impl Debug for Dependency[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.