Struct rust_release_channel::ArtefactToken [−][src]
Stores the identity of an Artefact
in a channel.
This allows one artefact in a channel to indicate which other artefacts it works with.
let token = rust_release_channel::ArtefactToken::new( "rls".into(), "x86_64-unknown-linux-gnu".into(), ); artefact.extensions.push(token);
If you want to name an artefact
that may or may not exist
in a channel,
you might want ArtefactQuery
instead.
Note that ArtefactQuery
implements From<&ArtefactToken>
,
so if you have an ArtefactToken
you can cheaply obtain an ArtefactQuery
whenever you want
with .into()
:
func_that_takes_query((&token).into());
Fields
pkg: String
The name of the package that was built to produce the target artefact.
See Channel::pkg
for details.
target: String
The name of the target the package was built for to produce the target artefact.
See Package::target
for details.
Methods
impl ArtefactToken
[src]
impl ArtefactToken
pub fn new(pkg: String, target: String) -> ArtefactToken
[src]
pub fn new(pkg: String, target: String) -> ArtefactToken
Create a new ArtefactToken for the given package and target.
pkg
is the name of the package that was built
to produce the target artefact.
target
is the name of the target the package was built for
to produce the target artefact.
let token = rust_release_channel::ArtefactToken::new( "somepackage".into(), "aarch64-unknown-linux-gnu".into(), );
Trait Implementations
impl Debug for ArtefactToken
[src]
impl Debug for ArtefactToken
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 ArtefactToken
[src]
impl Clone for ArtefactToken
fn clone(&self) -> ArtefactToken
[src]
fn clone(&self) -> ArtefactToken
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 ArtefactToken
[src]
impl PartialEq for ArtefactToken
fn eq(&self, other: &ArtefactToken) -> bool
[src]
fn eq(&self, other: &ArtefactToken) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &ArtefactToken) -> bool
[src]
fn ne(&self, other: &ArtefactToken) -> bool
This method tests for !=
.
impl Eq for ArtefactToken
[src]
impl Eq for ArtefactToken
impl PartialOrd for ArtefactToken
[src]
impl PartialOrd for ArtefactToken
fn partial_cmp(&self, other: &ArtefactToken) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &ArtefactToken) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &ArtefactToken) -> bool
[src]
fn lt(&self, other: &ArtefactToken) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &ArtefactToken) -> bool
[src]
fn le(&self, other: &ArtefactToken) -> 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: &ArtefactToken) -> bool
[src]
fn gt(&self, other: &ArtefactToken) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &ArtefactToken) -> bool
[src]
fn ge(&self, other: &ArtefactToken) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Ord for ArtefactToken
[src]
impl Ord for ArtefactToken
fn cmp(&self, other: &ArtefactToken) -> Ordering
[src]
fn cmp(&self, other: &ArtefactToken) -> 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 ArtefactToken
[src]
impl Hash for ArtefactToken
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 ArtefactToken
[src]
impl Display for ArtefactToken
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
[src]
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter. Read more
impl<'a> PartialEq<ArtefactQuery<'a>> for ArtefactToken
[src]
impl<'a> PartialEq<ArtefactQuery<'a>> for ArtefactToken
fn eq(&self, other: &ArtefactQuery<'a>) -> bool
[src]
fn eq(&self, other: &ArtefactQuery<'a>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl<'a> PartialEq<ArtefactToken> for ArtefactQuery<'a>
[src]
impl<'a> PartialEq<ArtefactToken> for ArtefactQuery<'a>
fn eq(&self, other: &ArtefactToken) -> bool
[src]
fn eq(&self, other: &ArtefactToken) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl<'a> From<&'a ArtefactToken> for ArtefactQuery<'a>
[src]
impl<'a> From<&'a ArtefactToken> for ArtefactQuery<'a>
fn from(src: &'a ArtefactToken) -> ArtefactQuery<'a>
[src]
fn from(src: &'a ArtefactToken) -> ArtefactQuery<'a>
Performs the conversion.
Auto Trait Implementations
impl Send for ArtefactToken
impl Send for ArtefactToken
impl Sync for ArtefactToken
impl Sync for ArtefactToken