Skip to main content

BuildRef

Struct BuildRef 

Source
pub struct BuildRef(/* private fields */);
Expand description

Reference to a build statement

Trait Implementations§

Source§

impl AsRef<Build> for BuildRef

Source§

fn as_ref(&self) -> &Build

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl BuildVariables for BuildRef

Source§

fn as_build(&self) -> &Build

Internal function for implementing variables for build
Source§

fn dyndep(self, dyndep: impl ToArg) -> Self

Specify dynamic dependency file Read more
Source§

fn with(self, inputs: impl IntoIterator<Item = impl ToArg>) -> Self

Add explicit dependencies (inputs) Read more
Source§

fn with_implicit(self, inputs: impl IntoIterator<Item = impl ToArg>) -> Self

Add implicit dependencies Read more
Source§

fn with_order_only(self, inputs: impl IntoIterator<Item = impl ToArg>) -> Self

Add order-only dependencies Read more
Source§

fn validations(self, validations: impl IntoIterator<Item = impl ToArg>) -> Self

Add validations Read more
Source§

fn output_implicit(self, outputs: impl IntoIterator<Item = impl ToArg>) -> Self

Add validations Read more
Source§

impl Clone for BuildRef

Source§

fn clone(&self) -> BuildRef

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for BuildRef

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Deref for BuildRef

Source§

type Target = Build

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl RuleVariables for BuildRef

Source§

fn depfile(self, depfile: impl ToArg) -> Self

Set the depfile for this rule or build to explicitly support C/C++ header dependencies Read more
Source§

fn deps_gcc(self) -> Self

Set deps = gcc for this rule or build Read more
Source§

fn deps_msvc_prefix(self, msvc_deps_prefix: impl ToArg) -> Self

Set deps = msvc for this rule (or build) and the msvc_deps_prefix variable Read more
Source§

fn deps_msvc(self) -> Self

Set deps = msvc for this rule or build without msvc_deps_prefix Read more
Source§

fn description(self, desc: impl ToArg) -> Self

Set the description of the rule to be printed during the build Read more
Source§

fn generator(self) -> Self

Indicate the rule is used to re-invoke the generator Read more
Source§

fn restat(self) -> Self

Specify restat = 1 for the rule or build Read more
Source§

fn rspfile(self, rspfile: impl ToArg, rspfile_content: impl ToArg) -> Self

Specify rspfile and rspfile_content variables for this rule or build Read more
Source§

fn pool_console(self) -> Self

Set pool = console for this rule or build Read more
Source§

fn pool(self, pool: impl AsRef<Pool>) -> Self

Set the pool for this rule or build Read more
Source§

impl Variables for BuildRef

Source§

fn add_variable_internal(&self, v: Variable)

Add a variable Read more
Source§

fn variable(self, name: impl ToArg, value: impl ToArg) -> Self

Add a variable to the current scope

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.