[][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,
    // 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 instad 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

Trait Implementations

impl Clone for Target
[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for Target
[src]

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

impl Serialize for Target
[src]

Auto Trait Implementations

impl Send for Target

impl Sync for Target

Blanket Implementations

impl<T> From for T
[src]

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

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

type Owned = T

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]