pub struct RustRelease<V: Debug, C = ()> {
pub version: V,
pub release_date: Option<Date>,
pub toolchains: Vec<Toolchain>,
pub context: C,
}Expand description
Type to model a Rust release.
§PartialEq, Eq, Ord, PartialOrd
With respect to the PartialEq, Eq, PartialOrd and Ord traits, a RustRelease
a is equal, less, or greater than a RustRelease b iff respectively the
a.version field is equal, less, or greater than b.version.
Fields§
§version: VThe version of a RustRelease.
The versioning scheme depends on the channel, which is why the version
type is a generic. In this library, the V is always substituted by one
of the following types: Stable, Beta or Nightly.
Stable and Beta carry a semver version number, while Nightly
is versioned by a date.
release_date: Option<Date>The release date of the release.
The field is optional, because the value may be absent from a data source.
toolchains: Vec<Toolchain>The toolchains associated with the release.
The field may be empty if toolchains were absent from a data source.
context: CArbitrary extra data
Implementations§
Source§impl<V: Debug> RustRelease<V, ()>
impl<V: Debug> RustRelease<V, ()>
Source§impl<V: Debug, C> RustRelease<V, C>
impl<V: Debug, C> RustRelease<V, C>
Sourcepub fn version(&self) -> &V
pub fn version(&self) -> &V
The version of a release.
The 3 component MAJOR.MINOR.PATCH version number of the release
Sourcepub fn release_date(&self) -> Option<&Date>
pub fn release_date(&self) -> Option<&Date>
Release date of the Rust release, if known
Sourcepub fn toolchains(&self) -> impl Iterator<Item = &Toolchain>
pub fn toolchains(&self) -> impl Iterator<Item = &Toolchain>
Toolchains associated with the release
Trait Implementations§
Source§impl<V: Clone + Debug, C: Clone> Clone for RustRelease<V, C>
impl<V: Clone + Debug, C: Clone> Clone for RustRelease<V, C>
Source§fn clone(&self) -> RustRelease<V, C>
fn clone(&self) -> RustRelease<V, C>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more