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

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<&'static 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 Encodable for Target

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

impl Display for Target

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

Derived Implementations

impl Debug for Target

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

impl Eq for Target

impl PartialEq for Target

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

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

impl Hash for Target

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

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

impl Clone for Target

fn clone(&self) -> Target

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