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
sourceimpl<'g> Clone for BuildTargetKind<'g>
impl<'g> Clone for BuildTargetKind<'g>
sourcefn clone(&self) -> BuildTargetKind<'g>
fn clone(&self) -> BuildTargetKind<'g>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<'g> Debug for BuildTargetKind<'g>
impl<'g> Debug for BuildTargetKind<'g>
sourceimpl<'g> Hash for BuildTargetKind<'g>
impl<'g> Hash for BuildTargetKind<'g>
sourceimpl<'g> Ord for BuildTargetKind<'g>
impl<'g> Ord for BuildTargetKind<'g>
sourceimpl<'g> PartialEq<BuildTargetKind<'g>> for BuildTargetKind<'g>
impl<'g> PartialEq<BuildTargetKind<'g>> for BuildTargetKind<'g>
sourcefn eq(&self, other: &BuildTargetKind<'g>) -> bool
fn eq(&self, other: &BuildTargetKind<'g>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &BuildTargetKind<'g>) -> bool
fn ne(&self, other: &BuildTargetKind<'g>) -> bool
This method tests for !=
.
sourceimpl<'g> PartialOrd<BuildTargetKind<'g>> for BuildTargetKind<'g>
impl<'g> PartialOrd<BuildTargetKind<'g>> for BuildTargetKind<'g>
sourcefn partial_cmp(&self, other: &BuildTargetKind<'g>) -> Option<Ordering>
fn partial_cmp(&self, other: &BuildTargetKind<'g>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl<'g> Eq for BuildTargetKind<'g>
impl<'g> StructuralEq for BuildTargetKind<'g>
impl<'g> StructuralPartialEq for BuildTargetKind<'g>
Auto Trait Implementations
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more