[−][src]Struct ptx_builder::builder::Builder
Core of the crate - PTX assembly build controller.
Methods
impl Builder
[src]
pub fn new<P: AsRef<Path>>(path: P) -> Result<Self>
[src]
Construct a builder for device crate at path
.
Can also be the same crate, for single-source mode:
use ptx_builder::prelude::*; match Builder::new(".")?.build()? { BuildStatus::Success(output) => { // do something with the output... } BuildStatus::NotNeeded => { // ... } }
pub fn is_build_needed() -> bool
[src]
Returns bool indicating whether the actual build is needed.
Behavior is consistent with
BuildStatus::NotNeeded
.
pub fn disable_colors(self) -> Self
[src]
Disable colors for internal calls to cargo
.
pub fn set_profile(self, profile: Profile) -> Self
[src]
Set build profile.
pub fn set_crate_type(self, crate_type: CrateType) -> Self
[src]
Set crate type that needs to be built.
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
pub fn build(&self) -> Result<BuildStatus>
[src]
Performs an actual build: runs cargo
with proper flags and environment.
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,