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

pub struct Target {
    // some fields omitted
}

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

Methods

impl Target
[src]

fn lib_target(name: &str, crate_targets: Vec<LibKind>, src_path: &Path, metadata: Metadata) -> Target

fn bin_target(name: &str, src_path: &Path, metadata: Option<Metadata>) -> Target

fn custom_build_target(name: &str, src_path: &Path, metadata: Option<Metadata>) -> Target

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

fn example_target(name: &str, src_path: &Path) -> Target

fn test_target(name: &str, src_path: &Path, metadata: Metadata) -> Target

fn bench_target(name: &str, src_path: &Path, metadata: Metadata) -> Target

fn name(&self) -> &str

fn crate_name(&self) -> String

fn src_path(&self) -> &Path

fn metadata(&self) -> Option<&Metadata>

fn kind(&self) -> &TargetKind

fn tested(&self) -> bool

fn harness(&self) -> bool

fn documented(&self) -> bool

fn for_host(&self) -> bool

fn benched(&self) -> bool

fn doctested(&self) -> bool

fn allows_underscores(&self) -> bool

fn is_lib(&self) -> bool

fn linkable(&self) -> bool

fn is_bin(&self) -> bool

fn is_example(&self) -> bool

fn is_test(&self) -> bool

fn is_bench(&self) -> bool

fn is_custom_build(&self) -> bool

fn rustc_crate_types(&self) -> Vec<&str>

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

fn can_lto(&self) -> bool

fn set_tested(&mut self, tested: bool) -> &mut Target

fn set_benched(&mut self, benched: bool) -> &mut Target

fn set_doctest(&mut self, doctest: bool) -> &mut Target

fn set_for_host(&mut self, for_host: bool) -> &mut Target

fn set_harness(&mut self, harness: bool) -> &mut Target

fn set_doc(&mut self, doc: bool) -> &mut Target

Trait Implementations

impl Debug for Target
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Eq for Target
[src]

impl PartialEq for Target
[src]

fn eq(&self, __arg_0: &Target) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, __arg_0: &Target) -> bool

This method tests for !=.

impl Hash for Target
[src]

fn hash<__H: Hasher>(&self, __arg_0: &mut __H)

Feeds this value into the state given, updating the hasher as necessary.

fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher
1.3.0

Feeds a slice of this type into the state provided.

impl Clone for Target
[src]

fn clone(&self) -> Target

Returns a copy of the value. Read more

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

Performs copy-assignment from source. Read more

impl Encodable for Target
[src]

fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error>

impl Display for Target
[src]

fn fmt(&self, f: &mut Formatter) -> Result

Formats the value using the given formatter.