#[non_exhaustive]pub enum BuildTargetKind<'g> {
LibraryOrExample(&'g [String]),
ProcMacro,
Binary,
}
Expand description
The type of build target (library or binary).
Obtained through BuildTarget::kind
.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
LibraryOrExample(&'g [String])
This build target is a library or example, with the specified crate types.
The crate types are sorted and unique, and can therefore be treated like a set.
Note that examples are typically binaries, but they may be libraries as well. Binary
examples will have the crate type "bin"
.
For more about crate types, see The crate-type
field
in the Cargo reference.
ProcMacro
This build target is a procedural macro.
This may only be returned for BuildTargetId::Library
. This is expressed in a Cargo.toml
file as:
[lib]
proc-macro = true
For more about procedural macros, see Procedural Macros in the Rust reference.
Binary
This build target is a binary target.
This kind is returned for build script, binary, test, and benchmark targets.
Trait Implementations§
Source§impl<'g> Clone for BuildTargetKind<'g>
impl<'g> Clone for BuildTargetKind<'g>
Source§fn clone(&self) -> BuildTargetKind<'g>
fn clone(&self) -> BuildTargetKind<'g>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl<'g> Debug for BuildTargetKind<'g>
impl<'g> Debug for BuildTargetKind<'g>
Source§impl<'g> Hash for BuildTargetKind<'g>
impl<'g> Hash for BuildTargetKind<'g>
Source§impl<'g> Ord for BuildTargetKind<'g>
impl<'g> Ord for BuildTargetKind<'g>
Source§fn cmp(&self, other: &BuildTargetKind<'g>) -> Ordering
fn cmp(&self, other: &BuildTargetKind<'g>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl<'g> PartialEq for BuildTargetKind<'g>
impl<'g> PartialEq for BuildTargetKind<'g>
Source§impl<'g> PartialOrd for BuildTargetKind<'g>
impl<'g> PartialOrd for BuildTargetKind<'g>
impl<'g> Eq for BuildTargetKind<'g>
impl<'g> StructuralPartialEq for BuildTargetKind<'g>
Auto Trait Implementations§
impl<'g> Freeze for BuildTargetKind<'g>
impl<'g> RefUnwindSafe for BuildTargetKind<'g>
impl<'g> Send for BuildTargetKind<'g>
impl<'g> Sync for BuildTargetKind<'g>
impl<'g> Unpin for BuildTargetKind<'g>
impl<'g> UnwindSafe for BuildTargetKind<'g>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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
key
and return true
if they are equal.