pub enum CrateType {
Bin,
Lib,
Rlib,
Dylib,
Cdylib,
Staticlib,
ProcMacro,
Other(String),
}
Expand description
Types of the output artifact that the compiler emits. Usually distributable or linkable either statically or dynamically.
See https://doc.rust-lang.org/nightly/reference/linkage.html.
Variants§
Implementations§
source§impl CrateType
impl CrateType
pub fn as_str(&self) -> &str
pub fn can_lto(&self) -> bool
pub fn is_linkable(&self) -> bool
pub fn is_dynamic(&self) -> bool
sourcepub fn requires_upstream_objects(&self) -> bool
pub fn requires_upstream_objects(&self) -> bool
Returns whether production of this crate type requires the object files from dependencies to be available.
See also TargetKind::requires_upstream_objects
.
Trait Implementations§
source§impl Ord for CrateType
impl Ord for CrateType
source§impl PartialEq<CrateType> for CrateType
impl PartialEq<CrateType> for CrateType
source§impl PartialOrd<CrateType> for CrateType
impl PartialOrd<CrateType> for CrateType
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for CrateType
impl StructuralEq for CrateType
impl StructuralPartialEq for CrateType
Auto Trait Implementations§
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
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more