Struct vergen::Vergen[][src]

pub struct Vergen { /* fields omitted */ }

Build time information struct.

Example build.rs

extern crate vergen;

use vergen::{ConstantsFlags, Result, Vergen};

fn main() {
    gen_constants().expect("Unable to generate vergen constants!");
}

fn gen_constants() -> Result<()> {
    let vergen = Vergen::new(ConstantsFlags::all())?;

    for (k, v) in vergen.build_info() {
        println!("cargo:rustc-env={}={}", k.name(), v);
    }

    Ok(())
}

Methods

impl Vergen
[src]

The build information map.

impl Vergen
[src]

Create a Vergen stuct to use in build.rs.

Trait Implementations

impl Clone for Vergen
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Vergen
[src]

Formats the value using the given formatter. Read more

impl Default for Vergen
[src]

Returns the "default value" for a type. Read more

impl Eq for Vergen
[src]

impl PartialEq for Vergen
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

impl Send for Vergen

impl Sync for Vergen