Enum guppy::graph::BuildTargetKind
source · #[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
)§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more