Struct rust_release_channel::ArtefactQuery[][src]

pub struct ArtefactQuery<'a> {
    pub pkg: &'a str,
    pub target: &'a str,
}

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

The name of the package that was built to produce the target artefact.

See Channel::pkg for details.

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]

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",
);

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]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<'a> Debug for ArtefactQuery<'a>
[src]

Formats the value using the given formatter. Read more

impl<'a> Copy for ArtefactQuery<'a>
[src]

impl<'a> Clone for ArtefactQuery<'a>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<'a> PartialEq for ArtefactQuery<'a>
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<'a> Eq for ArtefactQuery<'a>
[src]

impl<'a> PartialOrd for ArtefactQuery<'a>
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

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]

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

impl<'a> Hash for ArtefactQuery<'a>
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl<'a> Display for ArtefactQuery<'a>
[src]

Formats the value using the given formatter. Read more

impl<'a> PartialEq<ArtefactToken> for ArtefactQuery<'a>
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<'a> From<&'a ArtefactToken> for ArtefactQuery<'a>
[src]

Performs the conversion.

Auto Trait Implementations

impl<'a> Send for ArtefactQuery<'a>

impl<'a> Sync for ArtefactQuery<'a>