pub struct ArtefactToken {
pub pkg: String,
pub target: String,
}Expand description
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: StringThe name of the package that was built to produce the target artefact.
See Channel::pkg for details.
target: StringThe name of the target the package was built for to produce the target artefact.
See Package::target for details.
Implementations§
Source§impl ArtefactToken
impl ArtefactToken
Sourcepub fn new(pkg: String, target: String) -> ArtefactToken
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§
Source§impl Clone for ArtefactToken
impl Clone for ArtefactToken
Source§fn clone(&self) -> ArtefactToken
fn clone(&self) -> ArtefactToken
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more