Struct cargo_edit::Dependency[][src]

pub struct Dependency {
    pub name: String,
    // some fields omitted
}

A dependency handled by Cargo

Fields

The name of the dependency (as it is set in its Cargo.toml and known to crates.io)

Methods

impl Dependency
[src]

Create a new dependency with a name

Set dependency to a given version

Set dependency to a given repository

Set dependency to a given path

Set whether the dependency is optional

Get version of dependency

Convert dependency to TOML

Returns a tuple with the dependency's name and either the version as a String or the path/git repository as an InlineTable. (If the dependency is set as optional, an InlineTable is returned in any case.)

Trait Implementations

impl Debug for Dependency
[src]

Formats the value using the given formatter. Read more

impl Hash for Dependency
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl PartialEq for Dependency
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for Dependency
[src]

impl Clone for Dependency
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Default for Dependency
[src]

Returns the "default value" for a type. Read more

Auto Trait Implementations

impl Send for Dependency

impl Sync for Dependency