pub struct KernelManifest { /* private fields */ }Expand description
The record the kernel header tree carries, which bin/kernel-headers in tamnd/rucc-cross
writes.
A separate type rather than a Manifest with no target, because the tree is not any target’s.
One copy serves every Linux row in the table, which is crate::Kernel’s whole argument, and a
record that had to name a target would name the wrong one for every target but one. What it
names instead is the Linux release, which is what a sysroot’s own kernel line is about, so the
two can be read side by side.
Implementations§
Source§impl KernelManifest
impl KernelManifest
Sourcepub const fn new(linux: Version) -> Self
pub const fn new(linux: Version) -> Self
An empty record for the tree out of this Linux release.
Sourcepub fn files(&self) -> &[KernelFile]
pub fn files(&self) -> &[KernelFile]
Every file, in the order they were added.
Sourcepub fn push(&mut self, file: KernelFile)
pub fn push(&mut self, file: KernelFile)
Record one file.
Sourcepub fn render(&self) -> String
pub fn render(&self) -> String
The record as text, sorted by path, which is the same text the producer writes.
Sourcepub fn digest(&self) -> String
pub fn digest(&self) -> String
The sha256 of KernelManifest::render, which is what sha256sum says about the file, for
the reason Manifest::digest gives.
Sourcepub fn parse(text: &str) -> Result<Self, ManifestError>
pub fn parse(text: &str) -> Result<Self, ManifestError>
Read a record back.
§Errors
Which line was wrong and how, with the same errors a sysroot manifest has. The header being
some other file’s is ManifestError::NotAManifest, and a file line without its four fields
is ManifestError::BadKernelFile.