Struct cargo::core::manifest::Target [−][src]
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<LibKind>,
src_path: PathBuf,
edition: Edition
) -> Target
[src]
name: &str,
crate_targets: Vec<LibKind>,
src_path: PathBuf,
edition: Edition
) -> Target
pub fn bin_target(
name: &str,
src_path: PathBuf,
required_features: Option<Vec<String>>,
edition: Edition
) -> Target
[src]
name: &str,
src_path: PathBuf,
required_features: Option<Vec<String>>,
edition: Edition
) -> Target
pub fn custom_build_target(
name: &str,
src_path: PathBuf,
edition: Edition
) -> Target
[src]
name: &str,
src_path: PathBuf,
edition: Edition
) -> Target
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<LibKind>,
src_path: PathBuf,
required_features: Option<Vec<String>>,
edition: Edition
) -> Target
[src]
name: &str,
crate_targets: Vec<LibKind>,
src_path: PathBuf,
required_features: Option<Vec<String>>,
edition: Edition
) -> Target
pub fn test_target(
name: &str,
src_path: PathBuf,
required_features: Option<Vec<String>>,
edition: Edition
) -> Target
[src]
name: &str,
src_path: PathBuf,
required_features: Option<Vec<String>>,
edition: Edition
) -> Target
pub fn bench_target(
name: &str,
src_path: PathBuf,
required_features: Option<Vec<String>>,
edition: Edition
) -> Target
[src]
name: &str,
src_path: PathBuf,
required_features: Option<Vec<String>>,
edition: Edition
) -> Target
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 kind_mut(&mut self) -> &mut 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 allows_underscores(&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 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<&str>
[src]
Returns the arguments suitable for --crate-type
to pass to rustc.
pub fn can_lto(&self) -> bool
[src]
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 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]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for Target
[src]
fn cmp(&self, other: &Target) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<Target> for Target
[src]
impl PartialOrd<Target> for Target
[src]
fn partial_cmp(&self, other: &Target) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl Serialize for Target
[src]
impl StructuralEq for Target
[src]
impl StructuralPartialEq for Target
[src]
Auto Trait Implementations
impl RefUnwindSafe for Target
impl Send for Target
impl Sync for Target
impl Unpin for Target
impl UnwindSafe for Target
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,