Struct vergen::Build [−][src]
Configuration for the VERGEN_BUILD_*
instructions
Instructions
The following instructions can be generated:
Instruction | Default |
---|---|
cargo:rustc-env=VERGEN_BUILD_DATE=2021-02-12 | |
cargo:rustc-env=VERGEN_BUILD_TIME=11:22:34 | |
cargo:rustc-env=VERGEN_BUILD_TIMESTAMP=2021-02-12T01:54:15.134750+00:00 | * |
cargo:rustc-env=VERGEN_BUILD_SEMVER=4.2.0 | * |
- If the
timestamp
field is false, the date/time instructions will not be generated. - If the
semver
field is false, the semver instruction will not be generated. - NOTE - By default, the date/time related instructions will use
UTC
. - NOTE - The date/time instruction output is determined by the
kind
field and can be any combination of the three.
Example
use vergen::{vergen, Config}; use vergen::{TimestampKind, TimeZone}; let mut config = Config::default(); // Generate all three date/time instructions *config.build_mut().kind_mut() = TimestampKind::All; // Change the date/time instructions to show `Local` time *config.build_mut().timezone_mut() = TimeZone::Local; // Generate the instructions vergen(config)?;
Implementations
impl Build
[src]
pub fn timestamp_mut(&mut self) -> &mut bool
[src]
Enable/Disable the VERGEN_BUILD_DATE
, VERGEN_BUILD_TIME
, and VERGEN_BUILD_TIMESTAMP
instructions.
pub fn timezone_mut(&mut self) -> &mut TimeZone
[src]
The timezone to use for the date/time instructions.
pub fn kind_mut(&mut self) -> &mut TimestampKind
[src]
The kind of date/time instructions to output.
pub fn semver_mut(&mut self) -> &mut bool
[src]
Enable/Disable the VERGEN_BUILD_SEMVER
instruction.
Trait Implementations
impl Clone for Build
[src]
impl Copy for Build
[src]
impl Debug for Build
[src]
impl Default for Build
[src]
Auto Trait Implementations
impl RefUnwindSafe for Build
impl Send for Build
impl Sync for Build
impl Unpin for Build
impl UnwindSafe for Build
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
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]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,