Struct vergen::Sysinfo[][src]

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

Configuration for the VERGEN_SYSINFO_* instructions

Instructions

The following instructions can be generated:

InstructionDefault
cargo:rustc-env=VERGEN_SYSINFO_NAME=Darwin*
cargo:rustc-env=VERGEN_SYSINFO_OS_VERSION=MacOS 10.15.7 Catalina*
cargo:rustc-env=VERGEN_SYSINFO_USER=yoda*
cargo:rustc-env=VERGEN_SYSINFO_TOTAL_MEMORY=16 GB*
cargo:rustc-env=VERGEN_SYSINFO_CPU_VENDOR=Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz*
cargo:rustc-env=VERGEN_SYSINFO_CPU_CORE_COUNT=4*
  • If the name field is false, the VERGEN_SYSINFO_NAME instruction will not be generated.
  • If the os_version field is false, the VERGEN_SYSINFO_OS_VERSION instruction will not be generated.
  • If the user field is false, the VERGEN_SYSINFO_USER instruction will not be generated.
  • If the memory field is false, the VERGEN_SYSINFO_TOTAL_MEMORY instruction will not be generated.
  • If the cpu_vendor field is false, the VERGEN_SYSINFO_CPU_VENDOR instruction will not be generated.
  • If the cpu_core_count field is false, the VERGEN_SYSINFO_CPU_CORE_COUNT instruction will not be generated.

Example

use vergen::{vergen, Config};

let mut config = Config::default();
// Turn off the name instruction
*config.sysinfo_mut().name_mut() = false;

// Generate the instructions
vergen(config)?;

Implementations

Enable/Disable the sysinfo output

Enable/Disable the VERGEN_SYSINFO_NAME instruction

Enable/Disable the VERGEN_SYSINFO_OS_VERSION instruction

Enable/Disable the VERGEN_SYSINFO_USER instruction

Enable/Disable the VERGEN_SYSINFO_TOTAL_MEMORY instruction

Enable/Disable the VERGEN_SYSINFO_CPU_VENDOR instruction

Enable/Disable the VERGEN_SYSINFO_CPU_CORE_COUNT instruction

Enable/Disable the VERGEN_SYSINFO_CPU_NAME instruction

Enable/Disable the VERGEN_SYSINFO_CPU_BRAND instruction

Enable/Disable the VERGEN_SYSINFO_CPU_FREQUENCY 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.