#[non_exhaustive]pub enum LockError {
Parse(Error),
MissingRoot,
RootHasNoInputs,
InputHasNoSubInputs {
path: String,
},
InputNotFound {
path: String,
},
FollowsTargetMissing {
path: String,
},
NodeMissingForPath {
node: String,
path: String,
},
NodeMissing {
node: String,
},
FollowsCycle,
NodeNotLocked,
LockedHasNoRev,
}Expand description
Errors that arise from parsing or walking flake.lock.
Each variant pinpoints a distinct shape failure: a missing field, a follows cycle, or a node that the resolver cannot find. The variants carry the smallest contextual data (segment path, node key) that lets the caller reconstruct the failure without reparsing the message.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Parse(Error)
flake.lock did not parse as JSON.
MissingRoot
The lockfile has no root node referenced by nodes.
RootHasNoInputs
The root node carries no inputs, so a path cannot be walked.
InputHasNoSubInputs
An intermediate input on the path has no sub-inputs.
InputNotFound
A path segment does not resolve to a declared input.
FollowsTargetMissing
A follows declaration with an empty target was encountered while
walking. Surfaced as a hard failure when the path needs a target.
NodeMissingForPath
The node referenced by a path segment is absent from the nodes map.
NodeMissing
The node looked up directly by name is absent.
FollowsCycle
Recursion budget exhausted while resolving a follows path.
NodeNotLocked
A node has no locked block (so no rev can be retrieved).
LockedHasNoRev
A locked block has no rev.
Trait Implementations§
Source§impl Error for LockError
impl Error for LockError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Auto Trait Implementations§
impl !RefUnwindSafe for LockError
impl !UnwindSafe for LockError
impl Freeze for LockError
impl Send for LockError
impl Sync for LockError
impl Unpin for LockError
impl UnsafeUnpin for LockError
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> 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>
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 moreSource§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read more