#[non_exhaustive]pub enum Error {
Read {
path: PathBuf,
source: Error,
},
Write {
path: PathBuf,
source: Error,
},
Walker(WalkerError),
Lock(LockError),
DuplicateInput(String),
InputNotFound(String),
AddFollowDepthLimit {
path: String,
segments: usize,
},
Validation(Vec<ValidationError>),
}Expand description
Error for crate::edit::FlakeEdit operations.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Read
Failed to read a flake file. Carries the path that the read was attempted against so the caller can surface it.
Write
Failed to write a flake file.
Walker(WalkerError)
The CST walker rejected a change. See WalkerError for details.
Lock(LockError)
A failure parsing or walking flake.lock. See LockError for the
per-variant breakdown.
DuplicateInput(String)
Tried to add an input that already exists. The wrapped string is the existing input id.
InputNotFound(String)
Tried to operate on an input id that is not declared in the flake.
AddFollowDepthLimit
The add-follow subcommand received a path deeper than parent.child.
flake-edit follow accepts deeper paths, bounded by
crate::config::FollowConfig::max_depth when that is set; this
guard catches typos in the explicit-path command before they produce
nested inputs.*.inputs.*.follows chains.
Validation(Vec<ValidationError>)
Pre-edit validation found one or more fatal issues in flake.nix.
Implementations§
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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()
Source§impl From<WalkerError> for Error
impl From<WalkerError> for Error
Source§fn from(source: WalkerError) -> Self
fn from(source: WalkerError) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Freeze for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
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