[][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


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 Serialize for Target[src]

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

Auto Trait Implementations

impl Unpin for Target

impl Send for Target

impl Sync for Target

impl RefUnwindSafe for Target

impl UnwindSafe for Target

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<T> Borrow<T> for T where
    T: ?Sized

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

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