Info

Struct Info 

Source
pub struct Info {
    pub crate_version: String,
    pub crate_features: Vec<String>,
    pub build_date: String,
    pub build_datetime: String,
    pub git: Option<GitInfo>,
}
Expand description

Gathered build-time information

This struct contains all the information gathered by bosion. It is not meant to be used directly under normal circumstances, but is public for documentation purposes and if you wish to build your own frontend for whatever reason. In that case, note that no effort has been made to make this usable outside of the build.rs environment.

The git field is only available when the git feature is enabled, and if there is a git repository to read from. The repository is discovered by walking up the directory tree until one is found, which means workspaces or more complex monorepos are automatically supported. If there are any errors reading the repository, the git field will be None and a rustc warning will be printed.

Fields§

§crate_version: String

The crate version, as read from the CARGO_PKG_VERSION environment variable.

§crate_features: Vec<String>

The crate features, as found by the presence of CARGO_FEATURE_* environment variables.

These are normalised to lowercase and have underscores replaced by hyphens.

§build_date: String

The build date, in the format YYYY-MM-DD, at UTC.

This is either current as of build time, or from the timestamp specified by the SOURCE_DATE_EPOCH environment variable, for reproducible builds.

§build_datetime: String

The build datetime, in the format YYYY-MM-DD HH:MM:SS, at UTC.

This is either current as of build time, or from the timestamp specified by the SOURCE_DATE_EPOCH environment variable, for reproducible builds.

§git: Option<GitInfo>

Git repository information, if available.

Implementations§

Source§

impl Info

Source

pub fn gather() -> Result<Self, String>

Gathers build-time information

This is not meant to be used directly under normal circumstances, but is public if you wish to build your own frontend for whatever reason. In that case, note that no effort has been made to make this usable outside of the build.rs environment.

Trait Implementations§

Source§

impl Clone for Info

Source§

fn clone(&self) -> Info

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Info

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Info

§

impl RefUnwindSafe for Info

§

impl Send for Info

§

impl Sync for Info

§

impl Unpin for Info

§

impl UnwindSafe for Info

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.