[][src]Struct build_info_build::BuildScriptOptions

pub struct BuildScriptOptions { /* fields omitted */ }

Type to store any (optional) options for the build script.

Implementations

impl BuildScriptOptions[src]

pub fn build_timestamp(self, timestamp: DateTime<Utc>) -> Self[src]

Set the build timestamp by hand.

This is mostly important for reproducible builds using only cargo. If possible, consider setting the environment variable SOURCE_DATE_EPOCH instead, which does not require any setup.

pub fn build_timestamp_as_nanos(self, nanos: i64) -> Self[src]

Set the build timestamp by hand as nanosecond-precise UNIX timestamp.

This is mostly important for reproducible builds using only cargo. If possible, consider setting the environment variable SOURCE_DATE_EPOCH instead, which does not require any setup.

impl BuildScriptOptions[src]

pub fn build(self) -> BuildInfo[src]

Consumes the BuildScriptOptions and returns a BuildInfo object. Use this function if you wish to inspect the generated build information in build.rs.

Trait Implementations

impl Default for BuildScriptOptions[src]

impl Drop for BuildScriptOptions[src]

impl From<BuildScriptOptions> for BuildInfo[src]

Auto Trait Implementations

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, 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.