pub enum CrateType {
Library,
Binary,
}Expand description
Build specified crate type.
Mandatory for mixed crates - that have both lib.rs and main.rs,
otherwise Cargo won’t know which to build:
error: extra arguments to `rustc` can only be passed to one target, consider filtering
the package by passing e.g. `--lib` or `--bin NAME` to specify a single target§Usage
use ptx_builder::prelude::*;
Builder::new(".")?
.set_crate_type(CrateType::Library)
.build()?;Variants§
Trait Implementations§
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