Enum guppy::graph::BuildTargetId[][src]

#[non_exhaustive]pub enum BuildTargetId<'g> {
    Library,
    BuildScript,
    Binary(&'g str),
    Example(&'g str),
    Test(&'g str),
    Benchmark(&'g str),
}

An identifier for a build target within a package.

Variants (Non-exhaustive)

Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Library

A library target.

There may be at most one of these in a package.

Defined by the [lib] section in Cargo.toml.

BuildScript

A build script.

There may be at most one of these in a package.

Defined by the build attribute in Cargo.toml. For more about build scripts, see Build Scripts in the Cargo reference.

Binary(&'g str)

A binary target with its name.

Defined by the [[bin]] section in Cargo.toml.

Example(&'g str)

An example target with its name.

Examples are typically binary, but may be libraries or even both.

Defined by the [[example]] section in Cargo.toml.

Test(&'g str)

A test target with its name.

Tests are always binary targets.

Defined by the [[test]] section in Cargo.toml.

Benchmark(&'g str)

A benchmark target with its name.

Benchmarks are always binary targets.

Defined by the [[bench]] section in Cargo.toml.

Implementations

impl<'g> BuildTargetId<'g>[src]

pub fn name(&self) -> Option<&'g str>[src]

Returns the name embedded in this identifier, or None if this is a library target.

To get the name of the library target, use BuildTarget::name.

Trait Implementations

impl<'g> Clone for BuildTargetId<'g>[src]

impl<'g> Copy for BuildTargetId<'g>[src]

impl<'g> Debug for BuildTargetId<'g>[src]

impl<'g> Eq for BuildTargetId<'g>[src]

impl<'g> Hash for BuildTargetId<'g>[src]

impl<'g> Ord for BuildTargetId<'g>[src]

impl<'g> PartialEq<BuildTargetId<'g>> for BuildTargetId<'g>[src]

impl<'g> PartialOrd<BuildTargetId<'g>> for BuildTargetId<'g>[src]

impl<'g> StructuralEq for BuildTargetId<'g>[src]

impl<'g> StructuralPartialEq for BuildTargetId<'g>[src]

Auto Trait Implementations

impl<'g> RefUnwindSafe for BuildTargetId<'g>[src]

impl<'g> Send for BuildTargetId<'g>[src]

impl<'g> Sync for BuildTargetId<'g>[src]

impl<'g> Unpin for BuildTargetId<'g>[src]

impl<'g> UnwindSafe for BuildTargetId<'g>[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<'a, T> DefaultFeatures<'a> for T where
    T: 'a + Clone + Send + Sync
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<'a, T> NonSyncFeatures<'a> for T where
    T: 'a + Clone
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> RuleType for T where
    T: Eq + Ord + Copy + Debug + Hash
[src]

impl<T> SafeBorrow<T> for T where
    T: ?Sized
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,