pub struct BuildInfo {
pub version: &'static str,
pub git_describe: &'static str,
pub git_hash: &'static str,
pub commit_date: &'static str,
pub rustc_version: &'static str,
pub build_time: &'static str,
}Expand description
构建元信息(编译期常量集合)。
Fields§
§version: &'static strCargo.toml 里的 version 字段。
git_describe: &'static strgit describe --tags --always --dirty,例如 v0.3.0-200-g0ab3340-dirty。
git_hash: &'static str完整 40 位 commit hash。
commit_date: &'static str提交时间(ISO 8601 strict,带时区偏移)。
rustc_version: &'static strrustc --version,采集编译工具链。
build_time: &'static str编译时刻(Unix 秒),运行时由 chrono 解析回 RFC3339。
Auto Trait Implementations§
impl Freeze for BuildInfo
impl RefUnwindSafe for BuildInfo
impl Send for BuildInfo
impl Sync for BuildInfo
impl Unpin for BuildInfo
impl UnsafeUnpin for BuildInfo
impl UnwindSafe for BuildInfo
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> InitializeFromFunction<T> for T
impl<T> InitializeFromFunction<T> for T
§fn initialize_from_function(f: fn() -> T) -> T
fn initialize_from_function(f: fn() -> T) -> T
Create an instance of this type from an initialization function
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
§fn super_from(input: T) -> O
fn super_from(input: T) -> O
Convert from a type to another type.
§impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
§fn super_into(self) -> O
fn super_into(self) -> O
Convert from a type to another type.