[][src]Struct cargo_metadata::Target

pub struct Target {
    pub name: String,
    pub kind: Vec<String>,
    pub crate_types: Vec<String>,
    pub required_features: Vec<String>,
    pub src_path: PathBuf,
    pub edition: String,
    pub doctest: bool,
    pub test: bool,
    // some fields omitted
}

A single target (lib, bin, example, ...) provided by a crate

Fields

name: String

Name as given in the Cargo.toml or generated from the file name

kind: Vec<String>

Kind of target ("bin", "example", "test", "bench", "lib")

crate_types: Vec<String>

Almost the same as kind, except when an example is a library instead of an executable. In that case crate_types contains things like rlib and dylib while kind is example

required_features: Vec<String>

This target is built only if these features are enabled. It doesn't apply to lib targets.

src_path: PathBuf

Path to the main source file of the target

edition: String

Rust edition for this target

doctest: bool

Whether or not this target has doc tests enabled, and the target is compatible with doc testing.

This is always true if running with a version of Cargo older than 1.37.

test: bool

Whether or not this target is tested by default by cargo test.

This is always true if running with a version of Cargo older than 1.47.

Trait Implementations

impl Clone for Target[src]

impl Debug for Target[src]

impl<'de> Deserialize<'de> for Target[src]

impl Eq for Target[src]

impl Hash for Target[src]

impl PartialEq<Target> for Target[src]

impl Serialize for Target[src]

impl StructuralEq for Target[src]

impl StructuralPartialEq for Target[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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[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.