pub struct RustcVersion {
pub version_meta: VersionMeta,
pub short_string: String,
}Expand description
Contains a representation of a Rust compiler (toolchain) version.
Fields§
§version_meta: VersionMeta§short_string: StringImplementations§
Source§impl RustcVersion
impl RustcVersion
Sourcepub fn from_opt_sc_config_serde(opt_serde_version: &Option<String>) -> Self
pub fn from_opt_sc_config_serde(opt_serde_version: &Option<String>) -> Self
Parses the rustc version from sc-config.toml.
pub fn from_sc_config_serde(serde_version: &str) -> Self
Sourcepub fn current_version() -> RustcVersion
pub fn current_version() -> RustcVersion
Retrieves the current rustc version from crate rustc_version.
The value is embedded into the binary at compile time.
Sourcepub fn to_cli_arg(&self) -> String
pub fn to_cli_arg(&self) -> String
Formats as a CLI for cargo or rustup, e.g. cargo +1.88 build.
pub fn to_abi(&self) -> RustcAbi
pub fn from_abi(abi: &RustcAbi) -> Self
Trait Implementations§
Source§impl Clone for RustcVersion
impl Clone for RustcVersion
Source§fn clone(&self) -> RustcVersion
fn clone(&self) -> RustcVersion
Returns a duplicate 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 RustcVersion
impl Debug for RustcVersion
Source§impl Display for RustcVersion
impl Display for RustcVersion
Source§impl PartialEq for RustcVersion
impl PartialEq for RustcVersion
impl Eq for RustcVersion
impl StructuralPartialEq for RustcVersion
Auto Trait Implementations§
impl Freeze for RustcVersion
impl RefUnwindSafe for RustcVersion
impl Send for RustcVersion
impl Sync for RustcVersion
impl Unpin for RustcVersion
impl UnwindSafe for RustcVersion
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.