Struct cargo_metadata::Target [−][src]
A single target (lib, bin, example, …) provided by a crate
Fields
name: String
Name as given in the Cargo.toml
or generated from the file name
kind: Vec<String>
Kind of target (“bin”, “example”, “test”, “bench”, “lib”)
crate_types: Vec<String>
Almost the same as kind
, except when an example is a library instad of an executable.
In that case crate_types
contains things like rlib
and dylib
while kind
is example
required_features: Vec<String>
This target is built only if these features are enabled.
It doesn’t apply to lib
targets.
src_path: PathBuf
Path to the main source file of the target
edition: String
Rust edition for this target
doctest: bool
Whether or not this target has doc tests enabled, and the target is compatible with doc testing.
This is always true
if running with a version of Cargo older than 1.37.
Trait Implementations
impl Clone for Target
[src]
impl Debug for Target
[src]
impl<'de> Deserialize<'de> for Target
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Serialize 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> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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, 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>,