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

impl Sysinfo[src]

pub fn enabled_mut(&mut self) -> &mut bool[src]

Enable/Disable the sysinfo output

pub fn name_mut(&mut self) -> &mut bool[src]

Enable/Disable the VERGEN_SYSINFO_NAME instruction

pub fn os_version_mut(&mut self) -> &mut bool[src]

Enable/Disable the VERGEN_SYSINFO_OS_VERSION instruction

pub fn user_mut(&mut self) -> &mut bool[src]

Enable/Disable the VERGEN_SYSINFO_USER instruction

pub fn memory_mut(&mut self) -> &mut bool[src]

Enable/Disable the VERGEN_SYSINFO_TOTAL_MEMORY instruction

pub fn cpu_vendor_mut(&mut self) -> &mut bool[src]

Enable/Disable the VERGEN_SYSINFO_CPU_VENDOR instruction

pub fn cpu_core_count_mut(&mut self) -> &mut bool[src]

Enable/Disable the VERGEN_SYSINFO_CPU_CORE_COUNT instruction

pub fn cpu_name_mut(&mut self) -> &mut bool[src]

Enable/Disable the VERGEN_SYSINFO_CPU_NAME instruction

pub fn cpu_brand_mut(&mut self) -> &mut bool[src]

Enable/Disable the VERGEN_SYSINFO_CPU_BRAND instruction

pub fn cpu_frequency_mut(&mut self) -> &mut bool[src]

Enable/Disable the VERGEN_SYSINFO_CPU_FREQUENCY instruction

Trait Implementations

impl Clone for Sysinfo[src]

fn clone(&self) -> Sysinfo[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for Sysinfo[src]

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

Formats the value using the given formatter. Read more

impl Default for Sysinfo[src]

fn default() -> Self[src]

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

impl Copy for Sysinfo[src]

Auto Trait Implementations

impl RefUnwindSafe for Sysinfo

impl Send for Sysinfo

impl Sync for Sysinfo

impl Unpin for Sysinfo

impl UnwindSafe for Sysinfo

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

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

pub fn clone_into(&self, target: &mut T)[src]

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

recently added

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

Performs the conversion.

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

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

The type returned in the event of a conversion error.

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

Performs the conversion.