pub enum CrateType {
Binary,
Library,
ProcMacro,
Unknown,
}Expand description
Detect the crate type from Cargo.toml.
This helps provide better error messages and guidance for users.
Variants§
Binary
A binary crate ([[bin]] in Cargo.toml)
Library
A library crate ([lib] in Cargo.toml)
ProcMacro
A proc-macro crate ([lib] proc-macro = true in Cargo.toml)
Unknown
Unknown or workspace-only crate
Trait Implementations§
impl Eq for CrateType
impl StructuralPartialEq for CrateType
Auto Trait Implementations§
impl Freeze for CrateType
impl RefUnwindSafe for CrateType
impl Send for CrateType
impl Sync for CrateType
impl Unpin for CrateType
impl UnwindSafe for CrateType
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