#[non_exhaustive]pub struct KernelDirOutcome {
pub dir: PathBuf,
pub cache_hit: Option<KernelDirCacheHit>,
pub is_dirty: bool,
}Expand description
Result bundle from resolve_kernel_dir_to_entry.
Bundles the resolved boot-image directory, the cache-hit
signal, and the dirty-tree flag so callers do not have to
re-run gix::open to learn whether the build was reproducible.
The dirty flag is the single source of truth for downstream
label decoration (crate::test_support::sanitize_kernel_label’s
upstream caller appends _dirty so test reports show the run
used a non-reproducible build).
non_exhaustive so a future field (e.g. cache miss vs cache
store-failed distinction) can land without breaking external
destructuring. Construction goes through field literals at the
definition site only — every external consumer reads via the
public field accessors.
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.dir: PathBufDirectory that holds the resolved boot image.
- Clean tree: cache entry directory under one of the
local-{hash7}-{arch}[-cfg{user_config}]-kc{suffix}orlocal-unknown-{path_hash}-{arch}-kc{suffix}shapes (seecrate::fetch::compose_local_cache_key); boot image at<dir>/<image_name>. - Dirty tree: canonical source-tree directory, boot image at
<dir>/arch/x86/boot/bzImage(x86_64) or<dir>/arch/arm64/boot/Image(aarch64) — the kernel build-tree arch subdir (x86/arm64), not the arch_info() name (x86_64/aarch64).
Both shapes are valid inputs to
crate::kernel_path::find_image_in_dir.
cache_hit: Option<KernelDirCacheHit>Some when the resolution short-circuited on a cache hit —
the build pipeline did not run. None when the build
pipeline ran (clean-tree miss-then-build OR dirty-tree
build-without-store). is_dirty
distinguishes the two None cases.
is_dirty: boolWhether the source tree was non-reproducible. Union of two signals:
- Acquire-time inspection by
crate::fetch::local_source(uncommitted modifications before the build started, OR a non-git tree that has no commit hash to record). - Post-build re-check from
crate::fetch::inspect_local_source_state(worktree edited, branch flipped, or commit landed duringmake).
Either signal flips this to true. Always false on a cache
hit — the cache lookup gate requires a clean tree at acquire
time and the build pipeline does not run.
Trait Implementations§
Source§impl Clone for KernelDirOutcome
impl Clone for KernelDirOutcome
Source§fn clone(&self) -> KernelDirOutcome
fn clone(&self) -> KernelDirOutcome
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for KernelDirOutcome
impl RefUnwindSafe for KernelDirOutcome
impl Send for KernelDirOutcome
impl Sync for KernelDirOutcome
impl Unpin for KernelDirOutcome
impl UnwindSafe for KernelDirOutcome
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more