pub struct RunnerDownload {
pub os: String,
pub architecture: String,
pub download_url: String,
pub filename: String,
pub sha256_checksum: Option<String>,
}Expand description
One runner-package download GitHub publishes.
§sha256_checksum is optional, and stays optional
It is optional in GitHub’s response schema, and this layer passes that
through faithfully — as Option, never as an empty string and never as a
default. e2 fails closed on its absence, requiring an operator-pinned
digest rather than installing an unverified 150-300 MB package
(05-infrastructure.md), and it can only do that if this layer does not
paper the absence over.
Absent and empty are also kept apart. A missing field and a null both read
as None; a field GitHub sent as "" reads as Some(""). Both are unusable
as a digest, but they are different facts about GitHub’s response, and
collapsing them would leave e2 unable to report which one it saw.
Fields§
§os: StringGitHub’s OS token: win, osx, linux.
architecture: StringGitHub’s architecture token: x64, arm64, arm.
download_url: String§filename: String§sha256_checksum: Option<String>Implementations§
Source§impl RunnerDownload
impl RunnerDownload
Sourcepub fn matches(&self, os: Os, arch: Arch) -> bool
pub fn matches(&self, os: Os, arch: Arch) -> bool
Whether this entry is the package for os/arch.
Both sides are parsed through the domain’s own Os and Arch, whose
FromStr already accepts GitHub’s package tokens — win/osx/linux
and x64/arm64/arm — because Os::label_token was chosen to be
those very tokens. Comparing parsed values rather than strings is what
keeps a windows/win spelling difference from silently matching
nothing.
Sourcepub fn sha256_checksum(&self) -> Option<&str>
pub fn sha256_checksum(&self) -> Option<&str>
The published digest, if GitHub published one.
Trait Implementations§
Source§impl Clone for RunnerDownload
impl Clone for RunnerDownload
Source§fn clone(&self) -> RunnerDownload
fn clone(&self) -> RunnerDownload
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RunnerDownload
impl Debug for RunnerDownload
impl Eq for RunnerDownload
Source§impl PartialEq for RunnerDownload
impl PartialEq for RunnerDownload
impl StructuralPartialEq for RunnerDownload
Auto Trait Implementations§
impl Freeze for RunnerDownload
impl RefUnwindSafe for RunnerDownload
impl Send for RunnerDownload
impl Sync for RunnerDownload
impl Unpin for RunnerDownload
impl UnsafeUnpin for RunnerDownload
impl UnwindSafe for RunnerDownload
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.