Struct rust_release_channel::Package [−][src]
pub struct Package { pub version: String, pub git_commit_hash: Option<String>, pub target: BTreeMap<String, Artefact>, }
A single package installable from this release channel.
Building a package for a particular target produces an artefact, but every artefact should be built from the same source.
Fields
version: String
A human-readable version-number for this package.
This should be a SemVer version number of the form X.Y.Z
,
followed by a space,
an open-parenthesis,
a Git commit ID truncated to 9 digits,
a space,
the date of that commit in YYYY-MM-DD
format,
and a close-parenthesis:
1.2.3 (a1b2c3d4e 2018-02-26)
git_commit_hash: Option<String>
The complete Git commit ID of this version of this package.
May not be present if the commit ID is not known, or this package's source is not stored in a Git repository.
target: BTreeMap<String, Artefact>
A mapping from target names to Artefact
s of this package built
for that target.
A target name
(sometimes "target triplet",
although there's not always three parts)
is a name that identifies a particular hardware and software platform,
such as x86_64-unknown-linux-gnu
(for modern Linux PCs)
or i686-pc-windows-msvc
(for 32-bit Windows with the Visual C++ compiler).
Software built for a particular target
usually won't work on a different target,
so if you're looking for a particular package
you'll want to get the artefact for the platform you're using.
The special target name *
(an asterisk)
is used for packages that are the same on every concievable platform,
like rust-src
which contains the Rust source code.
Methods
impl Package
[src]
impl Package
pub fn new(version: String) -> Package
[src]
pub fn new(version: String) -> Package
Create a new, empty Package whose version is set to the given value.
By convention, version
is in the format X.Y.Z (HHHHHHH YYYY-MM-DD)
where X.Y.Z
is a SemVer version string,
HHHHHHH
is the abbreviated commit ID of the source repository
at that version,
and YYYY-MM-DD
is the date when that version was released.
let pkg = rust_release_channel::Package::new( "1.2.3 (abc1234 2018-02-26)".into() );
Trait Implementations
impl Debug for Package
[src]
impl Debug for Package
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for Package
[src]
impl Clone for Package
fn clone(&self) -> Package
[src]
fn clone(&self) -> Package
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl PartialEq for Package
[src]
impl PartialEq for Package
fn eq(&self, other: &Package) -> bool
[src]
fn eq(&self, other: &Package) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Package) -> bool
[src]
fn ne(&self, other: &Package) -> bool
This method tests for !=
.
impl Eq for Package
[src]
impl Eq for Package
impl PartialOrd for Package
[src]
impl PartialOrd for Package
fn partial_cmp(&self, other: &Package) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &Package) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Package) -> bool
[src]
fn lt(&self, other: &Package) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Package) -> bool
[src]
fn le(&self, other: &Package) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Package) -> bool
[src]
fn gt(&self, other: &Package) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Package) -> bool
[src]
fn ge(&self, other: &Package) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Ord for Package
[src]
impl Ord for Package
fn cmp(&self, other: &Package) -> Ordering
[src]
fn cmp(&self, other: &Package) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
impl Hash for Package
[src]
impl Hash for Package
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
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]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Display for Package
[src]
impl Display for Package