pub enum FilesError {
Show 17 variants
Open {
path: PathBuf,
source: Error,
},
NoWorktree,
Path(PathError),
InvalidSelector {
selector: PathSelector,
},
ManagedConflict {
path: RepositoryPath,
priority: u32,
},
CaseInsensitivePath {
first: RepositoryPath,
second: RepositoryPath,
},
Document {
path: RepositoryPath,
source: DocumentError,
},
ReadIndex {
source: Error,
},
ReadStatus {
source: Error,
},
WriteIndex {
source: Error,
},
Stage {
path: RepositoryPath,
source: Error,
},
Unsafe {
path: RepositoryPath,
},
Foreign {
paths: Vec<RepositoryPath>,
},
Stale {
path: RepositoryPath,
},
SnapshotPlan,
DuplicatePath(RepositoryPath),
Formatter(FormatterError),
}Expand description
Error returned by file reconciliation planning and application.
Variants§
Open
The repository root is not a Git repository git2 can open.
Fields
NoWorktree
The repository has no checked-out worktree.
Path(PathError)
A repository path is malformed, unsafe, or cannot be inspected.
InvalidSelector
A path rule’s selector rejects every segment it could match.
Fields
selector: PathSelectorThe selector that failed validation.
ManagedConflict
Two path rules disagree on managed for the same path and priority.
Fields
path: RepositoryPathThe path both rules matched.
CaseInsensitivePath
Two paths differ only by case, which collides on case-insensitive filesystems.
Fields
first: RepositoryPathThe first path seen with this case-insensitive form.
second: RepositoryPathThe later path that collides with it.
Document
A document failed validation, rendering, or reconciliation.
Fields
path: RepositoryPathThe file the document was declared for.
source: DocumentErrorThe underlying document failure.
ReadIndex
The Git index could not be read.
ReadStatus
The Git working tree status could not be read.
WriteIndex
The Git index could not be written.
Stage
A changed path could not be staged in the Git index.
Fields
path: RepositoryPathThe path that failed to stage.
Unsafe
A path’s current worktree content cannot be recovered from HEAD or the index, so changing it would be unsafe.
Fields
path: RepositoryPathThe path whose current state is not recoverable.
Foreign
Tracked files in managed paths that Ephemeris did not generate.
Fields
paths: Vec<RepositoryPath>The foreign paths.
Stale
A path changed after the plan was made.
Fields
path: RepositoryPathThe path whose state no longer matches the plan.
SnapshotPlan
crate::Plan::apply was called on a plan built for a snapshot.
DuplicatePath(RepositoryPath)
A planned update list names the same path more than once.
Formatter(FormatterError)
A formatter could not be applied.
Trait Implementations§
Source§impl Debug for FilesError
impl Debug for FilesError
Source§impl Display for FilesError
impl Display for FilesError
Source§impl Error for FilesError
impl Error for FilesError
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()