Struct cargo_toml_builder::types::Dependency
[−]
[src]
pub struct Dependency { pub label: String, pub dep_type: DependencyType, pub optional: Option<bool>, pub default_features: Option<bool>, }
Fields
label: String
dep_type: DependencyType
optional: Option<bool>
default_features: Option<bool>
Methods
impl Dependency
[src]
pub fn new(label: &str, dep_type: DependencyType) -> Dependency
[src]
pub fn is_inline(&self) -> bool
[src]
pub fn optional(&mut self, optional: bool) -> &mut Self
[src]
pub fn default_features(&mut self, default_features: bool) -> &mut Self
[src]
pub fn repo(label: &str, repo: &str) -> Dependency
[src]
pub fn version(label: &str, version: &str) -> Dependency
[src]
pub fn path(label: &str, path: &str) -> Dependency
[src]
pub fn rev(label: &str, repo: &str, rev: &str) -> Dependency
[src]
pub fn tag(label: &str, repo: &str, tag: &str) -> Dependency
[src]
pub fn branch(label: &str, repo: &str, branch: &str) -> Dependency
[src]
pub fn build(&self) -> Self
[src]
Trait Implementations
impl Debug for Dependency
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Clone for Dependency
[src]
fn clone(&self) -> Dependency
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq for Dependency
[src]
fn eq(&self, __arg_0: &Dependency) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Dependency) -> bool
[src]
This method tests for !=
.
impl<'a> From<&'a str> for Dependency
[src]
fn from(s: &'a str) -> Dependency
[src]
Performs the conversion.
impl From<String> for Dependency
[src]
fn from(s: String) -> Dependency
[src]
Performs the conversion.
impl<'a> From<&'a Dependency> for Dependency
[src]
fn from(d: &Dependency) -> Dependency
[src]
Performs the conversion.
impl<'a> From<&'a mut Dependency> for Dependency
[src]
fn from(d: &'a mut Dependency) -> Dependency
[src]
Performs the conversion.