Struct rust_release_channel::ArtefactQuery [−][src]
Names an Artefact
that might exist in a channel.
This structure provides
a way to talk about and refer to artefacts
without having to find an already-existing ArtefactToken
,
or construct a whole new one.
let query = rust_release_channel::ArtefactQuery::new( "rust", "x86_64-unknown-linux-gnu", ); let artefact = channel.lookup_artefact(query);
Fields
pkg: &'a str
The name of the package that was built to produce the target artefact.
See Channel::pkg
for details.
target: &'a str
The name of the target the package was built for to produce the target artefact.
See Package::target
for details.
Methods
impl<'a> ArtefactQuery<'a>
[src]
impl<'a> ArtefactQuery<'a>
pub fn new(pkg: &'a str, target: &'a str) -> ArtefactQuery<'a>
[src]
pub fn new(pkg: &'a str, target: &'a str) -> ArtefactQuery<'a>
Create a new ArtefactQuery 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 query = rust_release_channel::ArtefactQuery::new( "somepackage", "aarch64-unknown-linux-gnu", );
pub fn to_token(&self) -> ArtefactToken
[src]
pub fn to_token(&self) -> ArtefactToken
Create an ArtefactToken
with the same contents.
This allocates new copies of the pkg
and target
fields
so that the new ArtefactToken
struct can own them.
This is effectively the same thing as:
let token = rust_release_channel::ArtefactToken::new( query.pkg.into(), query.target.into(), );
An example:
let token = rust_release_channel::ArtefactQuery::new( "rls", "x86_64-unknown-linux-gnu", ).to_token(); artefact.extensions.push(token);
Trait Implementations
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> Debug for ArtefactQuery<'a>
[src]
impl<'a> Debug for ArtefactQuery<'a>
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<'a> Copy for ArtefactQuery<'a>
[src]
impl<'a> Copy for ArtefactQuery<'a>
impl<'a> Clone for ArtefactQuery<'a>
[src]
impl<'a> Clone for ArtefactQuery<'a>
fn clone(&self) -> ArtefactQuery<'a>
[src]
fn clone(&self) -> ArtefactQuery<'a>
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<'a> PartialEq for ArtefactQuery<'a>
[src]
impl<'a> PartialEq for ArtefactQuery<'a>
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: &ArtefactQuery<'a>) -> bool
[src]
fn ne(&self, other: &ArtefactQuery<'a>) -> bool
This method tests for !=
.
impl<'a> Eq for ArtefactQuery<'a>
[src]
impl<'a> Eq for ArtefactQuery<'a>
impl<'a> PartialOrd for ArtefactQuery<'a>
[src]
impl<'a> PartialOrd for ArtefactQuery<'a>
fn partial_cmp(&self, other: &ArtefactQuery<'a>) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &ArtefactQuery<'a>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &ArtefactQuery<'a>) -> bool
[src]
fn lt(&self, other: &ArtefactQuery<'a>) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &ArtefactQuery<'a>) -> bool
[src]
fn le(&self, other: &ArtefactQuery<'a>) -> 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: &ArtefactQuery<'a>) -> bool
[src]
fn gt(&self, other: &ArtefactQuery<'a>) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &ArtefactQuery<'a>) -> bool
[src]
fn ge(&self, other: &ArtefactQuery<'a>) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl<'a> Ord for ArtefactQuery<'a>
[src]
impl<'a> Ord for ArtefactQuery<'a>
fn cmp(&self, other: &ArtefactQuery<'a>) -> Ordering
[src]
fn cmp(&self, other: &ArtefactQuery<'a>) -> 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<'a> Hash for ArtefactQuery<'a>
[src]
impl<'a> Hash for ArtefactQuery<'a>
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<'a> Display for ArtefactQuery<'a>
[src]
impl<'a> Display for ArtefactQuery<'a>
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<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<'a> Send for ArtefactQuery<'a>
impl<'a> Send for ArtefactQuery<'a>
impl<'a> Sync for ArtefactQuery<'a>
impl<'a> Sync for ArtefactQuery<'a>