pub enum TargetKind {
Library,
Binary,
Test,
Bench,
Example,
BuildScript,
Unknown,
}Expand description
The role a source file plays in its package.
For Rust this is derived from the Cargo manifest and layout conventions; it lets later stages down-weight test and example code without discarding it.
Variants§
Library
Library sources (src/lib.rs and the module tree below it).
Binary
Binary sources (src/main.rs, src/bin/, or an explicit [[bin]]).
Test
Integration tests (tests/).
Bench
Benchmarks (benches/).
Example
Examples (examples/).
BuildScript
A Cargo build script (build.rs).
Unknown
Role could not be determined (for example, a C/C++ file outside any recognised package layout).
Implementations§
Trait Implementations§
Source§impl Clone for TargetKind
impl Clone for TargetKind
Source§fn clone(&self) -> TargetKind
fn clone(&self) -> TargetKind
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for TargetKind
Source§impl Debug for TargetKind
impl Debug for TargetKind
impl Eq for TargetKind
Source§impl PartialEq for TargetKind
impl PartialEq for TargetKind
impl StructuralPartialEq for TargetKind
Auto Trait Implementations§
impl Freeze for TargetKind
impl RefUnwindSafe for TargetKind
impl Send for TargetKind
impl Sync for TargetKind
impl Unpin for TargetKind
impl UnsafeUnpin for TargetKind
impl UnwindSafe for TargetKind
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.