Struct cargo::core::compiler::Unit [−][src]
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 test
ing and check
ing, 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]
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.
fn deref(&self) -> &UnitInner<'a>
[src]
impl<'a> Eq for Unit<'a>
[src]
impl<'a> Hash for Unit<'a>
[src]
fn hash<H: Hasher>(&self, hasher: &mut H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<'a> Ord for Unit<'a>
[src]
fn cmp(&self, other: &Unit<'a>) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl<'a> PartialEq<Unit<'a>> for Unit<'a>
[src]
fn eq(&self, other: &Unit<'a>) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,