Skip to main content

FilesError

Enum FilesError 

Source
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

§path: PathBuf

The path that failed to open as a Git repository.

§source: Error

The underlying git2 failure.

§

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: PathSelector

The selector that failed validation.

§

ManagedConflict

Two path rules disagree on managed for the same path and priority.

Fields

§path: RepositoryPath

The path both rules matched.

§priority: u32

The shared priority at which the rules disagree.

§

CaseInsensitivePath

Two paths differ only by case, which collides on case-insensitive filesystems.

Fields

§first: RepositoryPath

The first path seen with this case-insensitive form.

§second: RepositoryPath

The later path that collides with it.

§

Document

A document failed validation, rendering, or reconciliation.

Fields

§path: RepositoryPath

The file the document was declared for.

§source: DocumentError

The underlying document failure.

§

ReadIndex

The Git index could not be read.

Fields

§source: Error

The underlying git2 failure.

§

ReadStatus

The Git working tree status could not be read.

Fields

§source: Error

The underlying git2 failure.

§

WriteIndex

The Git index could not be written.

Fields

§source: Error

The underlying git2 failure.

§

Stage

A changed path could not be staged in the Git index.

Fields

§path: RepositoryPath

The path that failed to stage.

§source: Error

The underlying git2 failure.

§

Unsafe

A path’s current worktree content cannot be recovered from HEAD or the index, so changing it would be unsafe.

Fields

§path: RepositoryPath

The 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: RepositoryPath

The 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

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for FilesError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for FilesError

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<FormatterError> for FilesError

Source§

fn from(source: FormatterError) -> Self

Converts to this type from the input type.
Source§

impl From<PathError> for FilesError

Source§

fn from(source: PathError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.