pub struct Pinned {
pub tuple: &'static str,
pub url: &'static str,
pub sha256: &'static str,
}Expand description
One artifact: the sysroot for one target, as this release pins it.
Fields§
§tuple: &'static strThe target it is the sysroot for, in the spelling that names its directory under the cache.
url: &'static strWhere to get it. Handed to a downloader as it stands, and nothing here builds it out of parts.
sha256: &'static strThe sha256 of the archive, lowercase hex, which is what the bytes that arrive are held to.
Implementations§
Source§impl Pinned
impl Pinned
Sourcepub fn file_name(&self) -> &'static str
pub fn file_name(&self) -> &'static str
The name to write the archive under, which is the last component of the URL.
The URL’s own name rather than one built out of the tuple, so that the file on disk is the file the server served and a person comparing the two is comparing names as well as bytes.
Sourcepub fn archive_in(&self, cache: &Path) -> PathBuf
pub fn archive_in(&self, cache: &Path) -> PathBuf
Where in the cache the archive is kept.
Under the cache rather than in a temporary directory, because a machine with no downloader is
told this exact path and a second --fetch carries on from the check, which is section 13.8’s
answer for a host that cannot reach the network at all. It is kept after the install for the
same reason and for one more: a fetch of a target that is already installed then moves
nothing and says so.