Struct rustc_version_runtime::VersionMeta
source · pub struct VersionMeta {
pub semver: Version,
pub commit_hash: Option<String>,
pub commit_date: Option<String>,
pub build_date: Option<String>,
pub channel: Channel,
pub host: String,
pub short_version_string: String,
}
Expand description
Rustc version plus metada like git short hash and build date.
Fields§
§semver: Version
Version of the compiler
commit_hash: Option<String>
Git short hash of the build of the compiler
commit_date: Option<String>
Commit date of the compiler
build_date: Option<String>
Build date of the compiler; this was removed between Rust 1.0.0 and 1.1.0.
channel: Channel
Release channel of the compiler
host: String
Host target triple of the compiler
short_version_string: String
Short version string of the compiler
Implementations§
source§impl VersionMeta
impl VersionMeta
sourcepub fn for_command(cmd: Command) -> Result<VersionMeta, Error>
pub fn for_command(cmd: Command) -> Result<VersionMeta, Error>
Returns the version metadata for cmd
, which should be a rustc
command.
Trait Implementations§
source§impl Clone for VersionMeta
impl Clone for VersionMeta
source§fn clone(&self) -> VersionMeta
fn clone(&self) -> VersionMeta
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for VersionMeta
impl Debug for VersionMeta
source§impl Hash for VersionMeta
impl Hash for VersionMeta
source§impl Ord for VersionMeta
impl Ord for VersionMeta
source§fn cmp(&self, other: &VersionMeta) -> Ordering
fn cmp(&self, other: &VersionMeta) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for VersionMeta
impl PartialEq for VersionMeta
source§fn eq(&self, other: &VersionMeta) -> bool
fn eq(&self, other: &VersionMeta) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for VersionMeta
impl PartialOrd for VersionMeta
source§fn partial_cmp(&self, other: &VersionMeta) -> Option<Ordering>
fn partial_cmp(&self, other: &VersionMeta) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for VersionMeta
impl StructuralEq for VersionMeta
impl StructuralPartialEq for VersionMeta
Auto Trait Implementations§
impl RefUnwindSafe for VersionMeta
impl Send for VersionMeta
impl Sync for VersionMeta
impl Unpin for VersionMeta
impl UnwindSafe for VersionMeta
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