pub enum DatabaseError {
Show 16 variants
PathStepOverflow(i32, i32),
NoClosestDir(String),
NoMatchingID(String),
IdAlreadyExists(String),
IdenticalSourceDestination(PathBuf),
ExportDestinationInsideDatabase(PathBuf),
ImportSourceInsideDatabase(PathBuf),
RootIdUnsupported,
NotADirectory(PathBuf),
NotAFile(PathBuf),
OsStringConversion,
NoParent(String),
Io(Error),
SerdeJson(Error),
Bincode(Error),
PathBufConversion(StripPrefixError),
}Expand description
Errors returned by this library.
Variants§
PathStepOverflow(i32, i32)
Returned when requested path-step trimming exceeds the available path depth.
NoClosestDir(String)
Returned when no matching directory name can be found while walking upward.
NoMatchingID(String)
Returned when an ItemId name has no tracked entries in the index.
IdAlreadyExists(String)
Returned when creating or renaming to an ID that already exists at the target path.
IdenticalSourceDestination(PathBuf)
Returned when source and destination resolve to the same filesystem path.
ExportDestinationInsideDatabase(PathBuf)
Returned when an export destination points inside the managed database root.
ImportSourceInsideDatabase(PathBuf)
Returned when an import source path points inside the managed database root.
RootIdUnsupported
Returned when an operation does not allow ItemId::database_id() as input.
NotADirectory(PathBuf)
Returned when a path was expected to be a directory but is not.
NotAFile(PathBuf)
Returned when a path was expected to be a file but is not.
OsStringConversion
Returned when converting an OS string/path segment into UTF-8 text fails.
NoParent(String)
Returned when an item has no parent inside the tracked database tree.
Io(Error)
Returned when an underlying filesystem I/O operation fails.
SerdeJson(Error)
Returned when JSON serialization or deserialization fails.
Bincode(Error)
Returned when bincode serialization or deserialization fails.
PathBufConversion(StripPrefixError)
Returned when converting an absolute path into a database-relative path fails.