Struct rust_version::Version
[−]
[src]
pub struct Version { /* fields omitted */ }
Rust version.
Methods
impl Version
[src]
fn new(
release: Release,
channel: Channel,
commit: Option<Commit>,
date: Option<Date>
) -> Self
[src]
release: Release,
channel: Channel,
commit: Option<Commit>,
date: Option<Date>
) -> Self
Creates a version from a list of known facts.
fn from_installed(toolchain: Option<&str>) -> Result<Version>
[src]
Parses the version from a currently installed rustc
toolchain.
fn from_manifest(name: &str) -> Result<Version>
[src]
Parses the version from a manifest at static.rust-lang.org.
fn latest_stable() -> Result<Version>
[src]
Parses the version from the latest Stable.
fn latest_beta() -> Result<Version>
[src]
Parses the version from the latest Stable.
fn latest_nightly() -> Result<Version>
[src]
Parses the version from the latest Stable.
fn rustup_install(&self) -> Result<()>
[src]
Installs this version via rustup.
fn release(&self) -> Release
[src]
The release for this version.
fn channel(&self) -> Channel
[src]
The channel for this version.
fn date(&self) -> Option<Date>
[src]
The date for this version.
fn commit(&self) -> Option<&Commit>
[src]
The commit for this version.
fn toolchain(&self) -> &str
[src]
The name of the toolchain required by rustup and co.
This doesn't include the target.
Trait Implementations
impl Debug for Version
[src]
impl Clone for Version
[src]
fn clone(&self) -> Version
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Hash for Version
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
[src]
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Eq for Version
[src]
impl PartialEq for Version
[src]
fn eq(&self, __arg_0: &Version) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Version) -> bool
[src]
This method tests for !=
.
impl PartialOrd for Version
[src]
fn partial_cmp(&self, __arg_0: &Version) -> Option<Ordering>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &Version) -> bool
[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &Version) -> bool
[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, __arg_0: &Version) -> bool
[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &Version) -> bool
[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Ord for Version
[src]
fn cmp(&self, __arg_0: &Version) -> Ordering
[src]
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.22.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.22.0[src]
Compares and returns the minimum of two values. Read more
impl Display for Version
[src]
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<'a> TryFrom<&'a [u8]> for Version
[src]
type Error = ParseVersionError<'a>
try_from
)The type returned in the event of a conversion error.
fn try_from(bytes: &'a [u8]) -> Result<Version, ParseVersionError<'a>>
[src]
try_from
)Performs the conversion.
impl<'a> TryFrom<&'a str> for Version
[src]
type Error = ParseVersionError<'a>
try_from
)The type returned in the event of a conversion error.
fn try_from(s: &'a str) -> Result<Version, ParseVersionError<'a>>
[src]
try_from
)Performs the conversion.
impl Serialize for Version
[src]
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error>
[src]
Serialize this value into the given Serde serializer. Read more
impl<'de> Deserialize<'de> for Version
[src]
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
[src]
Deserialize this value from the given Serde deserializer. Read more