pub struct CrateDependency {
pub name: String,
pub version_req: String,
pub features: Vec<String>,
pub optional: bool,
pub dev: bool,
pub build: bool,
pub source: DependencySource,
}Expand description
A single dependency entry parsed from a Cargo.toml dependency table.
Fields§
§name: StringDependency crate name (the key in the table, or package override if set)
version_req: StringResolved version requirement string, e.g. "1.0", ">=0.14, <1", or "*" for
path/git deps without an explicit version
features: Vec<String>Cargo features enabled for this dependency
optional: boolWhether the dependency is optional = true
dev: boolTrue when this dep came from [dev-dependencies]
build: boolTrue when this dep came from [build-dependencies]
source: DependencySourceWhere the dependency lives
Trait Implementations§
Source§impl Clone for CrateDependency
impl Clone for CrateDependency
Source§fn clone(&self) -> CrateDependency
fn clone(&self) -> CrateDependency
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CrateDependency
impl RefUnwindSafe for CrateDependency
impl Send for CrateDependency
impl Sync for CrateDependency
impl Unpin for CrateDependency
impl UnsafeUnpin for CrateDependency
impl UnwindSafe for CrateDependency
Blanket Implementations§
impl<T> Allocation for T
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