pub enum Provenance {
Bundled,
Generated,
Fetched,
}Expand description
How an input got to where it is.
Section 13.5 asks for this field and does not say what the three answers mean, which makes the meaning a decision rather than a transcription. The question each answer has to settle is what a person reproducing a file has to have: an upstream release is enough for one of them, our own generator and its version is needed for the second, and the third did not exist on any machine until somebody’s network fetched it.
The test to apply is whether the bytes can be found in the upstream release. A header we unpack
and ship unchanged can be, so it is Provenance::Bundled. A stub shared object, a merged header
tree or a linker script cannot be, because this compiler wrote it, so it is
Provenance::Generated even though what it was derived from is upstream’s. Anything that arrived
over the network after the release was built is Provenance::Fetched, whoever wrote it.
Variants§
Bundled
Shipped inside the distribution, byte for byte as upstream released it. Reproducing it needs
the release named in Input::source and nothing of ours.
Generated
Written by this compiler from something upstream describes, which is the stubs of
spec/cross-compile/09-libc-stubs.md and the merged header trees of section 8.3.
Reproducing it needs our generator at the version that wrote it as well as the release.
Fetched
Downloaded onto this machine, which for the two licence walls of section 13.4 is the only way the input can legally arrive at all. The record says so because a sysroot holding one is not the same artifact as a sysroot that shipped complete.
Implementations§
Trait Implementations§
Source§impl Clone for Provenance
impl Clone for Provenance
Source§fn clone(&self) -> Provenance
fn clone(&self) -> Provenance
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more