#[non_exhaustive]pub struct Sighting {
pub format: FormatId,
pub offset: u64,
pub shape: &'static str,
pub kind: SightingKind,
pub more: u64,
}Expand description
A header a scanner SAW and has no gate for (Rulings S-V and 3-J): its
structure is a header’s, and something about it — a field this build
cannot check, a shape a shifted copy also takes — leaves the scan unable
to tell it from a phantom. So it is counted here and never becomes a
Candidate, because the engine advances past a candidate by its
declared length and a phantom’s length is how a scan jumps a real header.
Why it has to be reported at all. A run that recovers nothing while
seeing one refuses with Error::Unsupported (exit 3) — the scanner’s own
job, since only it can name the shape. A run that recovered OTHER entries
reports them at its ordinary exit code (Ruling S-X), and until Salvage
Stage 3’s Task 2-N it said nothing else: an entry stuffr list shows was
simply absent from salvage --list, at exit 0, with an empty stderr. The
sightings recorded here are what the caller prints instead
(describe_sightings), in a mixed run as in any other — and since the
stage’s final review (I-1, reversing S-X for this case) a non-selective
mixed run also exits 4, not 0: a salvage -C out && rm script must not
delete an archive holding an entry stuffr list reads.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.format: FormatIdThe scanner’s format, for the sentence describe_sightings writes.
offset: u64Where the header was seen.
shape: &'static strWhat was seen, as a plural noun phrase that follows a count —
"header(s) whose magic field … is neither \ustar` nor blank“`. One
phrase per shape, shared with the scanner’s own exit-3 refusal, so
the two can never describe one shape two ways.
kind: SightingKindWhy the header was not listed — which sentence
describe_sightings reports it in.
more: u64How many further sightings of this same (format, shape, kind) a
SightingLog saw but did not store, folded into this one. 0 from
every constructor. describe_sightings adds it to the count it
prints, so a capped log reports the same total as an uncapped one.
Implementations§
Source§impl Sighting
impl Sighting
Sourcepub fn new(format: FormatId, offset: u64, shape: &'static str) -> Self
pub fn new(format: FormatId, offset: u64, shape: &'static str) -> Self
An SightingKind::Ungateable sighting.
Sourcepub fn with_more(self, more: u64) -> Self
pub fn with_more(self, more: u64) -> Self
This sighting standing for more further ones that were counted but
not stored (see Sighting::more).
Sourcepub fn work_bounded(format: FormatId, offset: u64, shape: &'static str) -> Self
pub fn work_bounded(format: FormatId, offset: u64, shape: &'static str) -> Self
A SightingKind::WorkBounded sighting.
Sourcepub fn verdict_bounded(
format: FormatId,
offset: u64,
shape: &'static str,
) -> Self
pub fn verdict_bounded( format: FormatId, offset: u64, shape: &'static str, ) -> Self
A SightingKind::VerdictBounded sighting: the candidate at
offset was refused unexamined because the scan’s ScanBudget
was spent.