#[non_exhaustive]pub struct AcquiredSource {
pub source_dir: PathBuf,
pub cache_key: String,
pub version: Option<String>,
pub kernel_source: KernelSource,
pub is_temp: bool,
pub is_dirty: bool,
pub is_git: bool,
}Expand description
Downloaded/cloned kernel source ready for building.
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.source_dir: PathBufPath to the kernel source directory.
cache_key: StringCache key for this source (e.g. “6.14.2-tarball-x86_64-kc{kconfig_hash}”).
version: Option<String>Version string if known (e.g. “6.14.2”, “6.15-rc3”).
kernel_source: KernelSourceHow the source was acquired, with per-variant payload
(git hash/ref for Git, source tree path and git hash for
Local).
is_temp: boolWhether the source is a temporary directory that should be cleaned up after building.
is_dirty: boolFor local sources: whether the working tree is dirty. Dirty trees must not be cached.
is_git: boolFor local sources: whether the source is an actual git
repository. true when gix::discover succeeded and the
crate could compute index + worktree dirty state; false
for non-git source trees (tarball-extracted, rsync’d,
hand-assembled) where dirty detection is impossible and
the source is always cache-skipped pessimistically. Lets
the cache-skip hint branch on whether commit / stash
are actionable remediations (they aren’t for non-git
sources).
For non-local sources (tarball, git clone) the field is
set to true by convention — these paths are always
is_dirty = false, so the cache-skip branch that reads
is_git is never reached and the value is inert. Pinning
to true (rather than leaving the field meaningless)
keeps the invariant “is_git is meaningful only when
is_dirty is true, but always set” so a future code path
that reaches is_git outside the cache-skip context does
not trip on an is_git = false under a known-good source.
Auto Trait Implementations§
impl Freeze for AcquiredSource
impl RefUnwindSafe for AcquiredSource
impl Send for AcquiredSource
impl Sync for AcquiredSource
impl Unpin for AcquiredSource
impl UnwindSafe for AcquiredSource
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
§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