Struct rust_release_channel::ArtefactToken[][src]

pub struct ArtefactToken {
    pub pkg: String,
    pub target: String,
}

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

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 ArtefactToken
[src]

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]

Formats the value using the given formatter. Read more

impl Clone for ArtefactToken
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq 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 Eq for ArtefactToken
[src]

impl PartialOrd for ArtefactToken
[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 Ord for ArtefactToken
[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 Hash for ArtefactToken
[src]

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

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

impl Display for ArtefactToken
[src]

Formats the value using the given formatter. Read more

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> 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