Struct vergen::Cargo[][src]

pub struct Cargo { /* fields omitted */ }

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

impl Cargo[src]

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

Enable/Disable the VERGEN_CARGO_FEATURES instruction

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

Enable/Disable the VERGEN_CARGO_PROFILE instruction

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

Enable/Disable the VERGEN_CARGO_TARGET_TRIPLE instruction

Trait Implementations

impl Clone for Cargo[src]

impl Copy for Cargo[src]

impl Debug for Cargo[src]

impl Default for Cargo[src]

Auto Trait Implementations

impl RefUnwindSafe for Cargo

impl Send for Cargo

impl Sync for Cargo

impl Unpin for Cargo

impl UnwindSafe for Cargo

Blanket Implementations

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

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

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

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

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

impl<T> Pointable for T

type Init = T

The type for initializers.

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

type Owned = T

The resulting type after obtaining ownership.

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.

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.