[][src]Struct ptx_builder::builder::Builder

pub struct Builder { /* fields omitted */ }

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

impl Debug for Builder[src]

Auto Trait Implementations

impl Send for Builder

impl Sync for Builder

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

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.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]