#[non_exhaustive]pub enum UnitKind {
Lib,
ProcMacro,
Bin,
Test,
BuildScriptCompile,
BuildScriptRun,
Other,
}Expand description
What sort of work a unit performs.
The simulator does not read this; it exists so that output can describe a unit and so that transformations can refuse to do something meaningless, such as splitting a build script. More variants may be added, so callers must not assume the set is closed.
Variants (Non-exhaustive)§
This enum is marked as 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.
Lib
A library that other units compile against.
ProcMacro
A procedural macro, which must be fully built and loaded before a dependent can use it.
Bin
An executable.
Test
A test or benchmark binary.
BuildScriptCompile
Compiling a build script into an executable.
BuildScriptRun
Running a build script that has already been compiled.
Other
Anything else.
Implementations§
Trait Implementations§
impl Copy for UnitKind
impl Eq for UnitKind
Source§impl Ord for UnitKind
impl Ord for UnitKind
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for UnitKind
impl PartialOrd for UnitKind
impl StructuralPartialEq for UnitKind
Auto Trait Implementations§
impl Freeze for UnitKind
impl RefUnwindSafe for UnitKind
impl Send for UnitKind
impl Sync for UnitKind
impl Unpin for UnitKind
impl UnsafeUnpin for UnitKind
impl UnwindSafe for UnitKind
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more