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

pub struct Unit { /* 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 Unit[src]

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

Trait Implementations

impl Clone for Unit[src]

impl Debug for Unit[src]

impl Deref for Unit[src]

type Target = UnitInner

The resulting type after dereferencing.

impl Eq for Unit[src]

impl Hash for Unit[src]

impl Ord for Unit[src]

impl PartialEq<Unit> for Unit[src]

impl PartialOrd<Unit> for Unit[src]

Auto Trait Implementations

impl !RefUnwindSafe for Unit

impl !Send for Unit

impl !Sync for Unit

impl Unpin for Unit

impl !UnwindSafe for Unit

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

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>,