Struct cargo::core::manifest::Target
[−]
[src]
pub struct Target { /* 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: PathBuf
) -> Target
name: &str,
crate_targets: Vec<LibKind>,
src_path: PathBuf
) -> Target
fn bin_target(
name: &str,
src_path: PathBuf,
required_features: Option<Vec<String>>
) -> Target
name: &str,
src_path: PathBuf,
required_features: Option<Vec<String>>
) -> Target
fn custom_build_target(name: &str, src_path: PathBuf) -> Target
Builds a Target
corresponding to the build = "build.rs"
entry.
fn example_target(
name: &str,
crate_targets: Vec<LibKind>,
src_path: PathBuf,
required_features: Option<Vec<String>>
) -> Target
name: &str,
crate_targets: Vec<LibKind>,
src_path: PathBuf,
required_features: Option<Vec<String>>
) -> Target
fn test_target(
name: &str,
src_path: PathBuf,
required_features: Option<Vec<String>>
) -> Target
name: &str,
src_path: PathBuf,
required_features: Option<Vec<String>>
) -> Target
fn bench_target(
name: &str,
src_path: PathBuf,
required_features: Option<Vec<String>>
) -> Target
name: &str,
src_path: PathBuf,
required_features: Option<Vec<String>>
) -> Target
fn name(&self) -> &str
fn crate_name(&self) -> String
fn src_path(&self) -> &Path
fn required_features(&self) -> Option<&Vec<String>>
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 is_dylib(&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 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 Hash for Target
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
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 Eq for Target
[src]
impl Debug for Target
[src]
impl Serialize for Target
[src]
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error>
Serialize this value into the given Serde serializer. Read more