pub enum DepGraphLoadOutcome {
Loaded {
graph: DepGraph,
},
Missing,
VersionMismatch {
file_version: u32,
expected_version: u32,
},
Corrupt {
message: String,
},
IoError {
message: String,
},
}Expand description
Outcome of attempting to load the persisted depgraph from a cache directory.
Returned by classify_load so the daemon can both seed its in-memory
graph and surface the load result to operators (stderr + last-session.log).
The variants mirror the failure modes the daemon must handle distinctly:
Loaded— file present, magic + version + payload all valid; the graph is ready to serve hits from the very first lookup.Missing— nodepgraph.binin the cache dir. Genuine cold start.VersionMismatch— file present but the embedded version tag does not match this build. The on-disk format changed since the prior session.Corrupt— magic mismatch, truncated, or payload validation failed.IoError— any other I/O failure reading the file.
Variants§
Implementations§
Source§impl DepGraphLoadOutcome
impl DepGraphLoadOutcome
Sourcepub fn into_graph(self) -> Option<DepGraph>
pub fn into_graph(self) -> Option<DepGraph>
Returns the loaded graph if this outcome is Loaded, else None.
Sourcepub fn warning(&self, path: &Path) -> Option<String>
pub fn warning(&self, path: &Path) -> Option<String>
Returns a human-readable warning message for non-Loaded, non-Missing
outcomes. Used by the daemon to emit a clear notice on stderr AND in the
per-session log so operators can see exactly why the warm-load failed
and the session fell back to cold behavior.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for DepGraphLoadOutcome
impl !RefUnwindSafe for DepGraphLoadOutcome
impl Send for DepGraphLoadOutcome
impl Sync for DepGraphLoadOutcome
impl Unpin for DepGraphLoadOutcome
impl UnsafeUnpin for DepGraphLoadOutcome
impl UnwindSafe for DepGraphLoadOutcome
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
Mutably borrows from an owned value. Read more
Source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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>
Converts
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>
Converts
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 moreSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.