[][src]Struct cargo::core::manifest::Target

pub struct Target { /* fields omitted */ }

Information about a binary, a library, an example, etc. that is part of the package.

Implementations

impl Target[src]

pub fn lib_target(
    name: &str,
    crate_targets: Vec<CrateType>,
    src_path: PathBuf,
    edition: Edition
) -> Target
[src]

pub fn bin_target(
    name: &str,
    src_path: PathBuf,
    required_features: Option<Vec<String>>,
    edition: Edition
) -> Target
[src]

pub fn custom_build_target(
    name: &str,
    src_path: PathBuf,
    edition: Edition
) -> Target
[src]

Builds a Target corresponding to the build = "build.rs" entry.

pub fn metabuild_target(name: &str) -> Target[src]

pub fn example_target(
    name: &str,
    crate_targets: Vec<CrateType>,
    src_path: PathBuf,
    required_features: Option<Vec<String>>,
    edition: Edition
) -> Target
[src]

pub fn test_target(
    name: &str,
    src_path: PathBuf,
    required_features: Option<Vec<String>>,
    edition: Edition
) -> Target
[src]

pub fn bench_target(
    name: &str,
    src_path: PathBuf,
    required_features: Option<Vec<String>>,
    edition: Edition
) -> Target
[src]

pub fn name(&self) -> &str[src]

pub fn crate_name(&self) -> String[src]

pub fn src_path(&self) -> &TargetSourcePath[src]

pub fn set_src_path(&mut self, src_path: TargetSourcePath)[src]

pub fn required_features(&self) -> Option<&Vec<String>>[src]

pub fn kind(&self) -> &TargetKind[src]

pub fn tested(&self) -> bool[src]

pub fn harness(&self) -> bool[src]

pub fn documented(&self) -> bool[src]

pub fn for_host(&self) -> bool[src]

pub fn proc_macro(&self) -> bool[src]

pub fn edition(&self) -> Edition[src]

pub fn benched(&self) -> bool[src]

pub fn doctested(&self) -> bool[src]

pub fn doctestable(&self) -> bool[src]

pub fn is_lib(&self) -> bool[src]

pub fn is_dylib(&self) -> bool[src]

pub fn is_cdylib(&self) -> bool[src]

pub fn is_linkable(&self) -> bool[src]

Returns whether this target produces an artifact which can be linked into a Rust crate.

This only returns true for certain kinds of libraries.

pub fn is_bin(&self) -> bool[src]

pub fn is_example(&self) -> bool[src]

pub fn is_executable(&self) -> bool[src]

Returns true if it is a binary or executable example. NOTE: Tests are false!

pub fn is_exe_example(&self) -> bool[src]

Returns true if it is an executable example.

pub fn is_test(&self) -> bool[src]

pub fn is_bench(&self) -> bool[src]

pub fn is_custom_build(&self) -> bool[src]

pub fn rustc_crate_types(&self) -> Vec<CrateType>[src]

Returns the arguments suitable for --crate-type to pass to rustc.

pub fn set_tested(&mut self, tested: bool) -> &mut Target[src]

pub fn set_benched(&mut self, benched: bool) -> &mut Target[src]

pub fn set_doctest(&mut self, doctest: bool) -> &mut Target[src]

pub fn set_for_host(&mut self, for_host: bool) -> &mut Target[src]

pub fn set_proc_macro(&mut self, proc_macro: bool) -> &mut Target[src]

pub fn set_edition(&mut self, edition: Edition) -> &mut Target[src]

pub fn set_harness(&mut self, harness: bool) -> &mut Target[src]

pub fn set_doc(&mut self, doc: bool) -> &mut Target[src]

pub fn set_kind(&mut self, kind: TargetKind) -> &mut Target[src]

pub fn set_name(&mut self, name: &str) -> &mut Target[src]

pub fn set_required_features(
    &mut self,
    required_features: Option<Vec<String>>
) -> &mut Target
[src]

pub fn description_named(&self) -> String[src]

Trait Implementations

impl Clone for Target[src]

impl Debug for Target[src]

impl Display for Target[src]

impl Eq for Target[src]

impl Hash for Target[src]

impl Ord for Target[src]

impl PartialEq<Target> for Target[src]

impl PartialOrd<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> From<T> for T[src]

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,