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>,
) -> RustcVersion
pub fn from_opt_sc_config_serde( opt_serde_version: &Option<String>, ) -> RustcVersion
Parses the rustc version from sc-config.toml.
pub fn from_sc_config_serde(serde_version: &str) -> RustcVersion
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) -> RustcVersion
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.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> InterpretableFrom<&T> for Twhere
T: Clone,
impl<T> InterpretableFrom<&T> for Twhere
T: Clone,
fn interpret_from(from: &T, _context: &InterpreterContext) -> T
Source§impl<T> InterpretableFrom<T> for T
impl<T> InterpretableFrom<T> for T
fn interpret_from(from: T, _context: &InterpreterContext) -> T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ReconstructableFrom<&T> for Twhere
T: Clone,
impl<T> ReconstructableFrom<&T> for Twhere
T: Clone,
fn reconstruct_from(from: &T, _builder: &ReconstructorContext) -> T
Source§impl<T> ReconstructableFrom<T> for T
impl<T> ReconstructableFrom<T> for T
fn reconstruct_from(from: T, _builder: &ReconstructorContext) -> T
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.