Struct vergen::Cargo[][src]

pub struct Cargo { /* fields omitted */ }
Expand description

Configuration for the VERGEN_CARGO_* instructions

Instructions

The following instructions can be generated:

InstructionDefault
cargo:rustc-env=VERGEN_CARGO_TARGET_TRIPLE=x86_64-unknown-linux-gnu*
cargo:rustc-env=VERGEN_CARGO_PROFILE=debug*
cargo:rustc-env=VERGEN_CARGO_FEATURES=git,build*
  • If the features field is false, the features instruction will not be generated.
  • If the profile field is false, the profile instruction will not be generated.
  • If the target_triple field is false, the target triple instruction will not be generated.
  • NOTE - the target_triple instruction can differ from the host_triple instruction, i.e. during cross compilation

Example

use vergen::{vergen, Config};

let mut config = Config::default();
// Turn off the features instruction
*config.cargo_mut().features_mut() = false;

// Generate the instructions
vergen(config)?;

Implementations

Enable/Disable the cargo output

Enable/Disable the VERGEN_CARGO_FEATURES instruction

Enable/Disable the VERGEN_CARGO_PROFILE instruction

Enable/Disable the VERGEN_CARGO_TARGET_TRIPLE instruction

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

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

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

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.