Struct cargo::core::compiler::Unit[][src]

pub struct Unit<'a> { /* fields omitted */ }

All information needed to define a unit.

A unit is an object that has enough information so that cargo knows how to build it. For example, if your package has dependencies, then every dependency will be built as a library unit. If your package is a library, then it will be built as a library unit as well, or if it is a binary with main.rs, then a binary will be output. There are also separate unit types for testing and checking, amongst others.

The unit also holds information about all possible metadata about the package in pkg.

A unit needs to know extra information in addition to the type and root source file. For example, it needs to know the target architecture (OS, chip arch etc.) and it needs to know whether you want a debug or release build. There is enough information in this struct to figure all that out.

Implementations

impl<'a> Unit<'a>[src]

pub fn buildkey(&self) -> String[src]

Trait Implementations

impl<'a> Clone for Unit<'a>[src]

impl<'a> Copy for Unit<'a>[src]

impl<'a> Debug for Unit<'a>[src]

impl<'a> Deref for Unit<'a>[src]

type Target = UnitInner<'a>

The resulting type after dereferencing.

impl<'a> Eq for Unit<'a>[src]

impl<'a> Hash for Unit<'a>[src]

impl<'a> Ord for Unit<'a>[src]

impl<'a> PartialEq<Unit<'a>> for Unit<'a>[src]

impl<'a> PartialOrd<Unit<'a>> for Unit<'a>[src]

Auto Trait Implementations

impl<'a> !RefUnwindSafe for Unit<'a>

impl<'a> !Send for Unit<'a>

impl<'a> !Sync for Unit<'a>

impl<'a> Unpin for Unit<'a>

impl<'a> !UnwindSafe for Unit<'a>

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<T> From<T> for T[src]

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

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

type Output = T

Should always be Self

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>, 
[src]