pub struct Config { /* private fields */ }
Expand description

Configure vergen to produce the cargo: instructions you need

  • See Build for details on VERGEN_BUILD_* instruction configuration
  • See Cargo for details on VERGEN_CARGO_* instruction configuration
  • See Git for details on VERGEN_GIT_* instruction configuration
  • See Rustc for details on VERGEN_RUSTC_* instruction configuration
  • See Sysinfo for details on VERGEN_SYSINFO_* instruction configuration

Example

use vergen::Config;
use vergen::ShaKind;

let mut config = Config::default();
// Turn off the build semver instruction
*config.build_mut().semver_mut() = false;
// Change the SHA output to the short variant
*config.git_mut().sha_kind_mut() = ShaKind::Short;
// Turn off the LLVM version instruction
*config.rustc_mut().llvm_version_mut() = false;
// Turn off the cargo profile instruction
*config.cargo_mut().profile_mut() = false;
// Turn off the sysinfo name instruction
*config.sysinfo_mut().name_mut() = false;

Implementations

Use this to modify the Build feature configuration.

Use this to modify the Cargo feature configuration.

Use this to modify the Git feature configuration.

Use this to modify the Rustc feature configuration.

Use this to modify the Sysinfo feature configuration.

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

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.

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

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.