pub enum Error {
Io {
path: PathBuf,
source: Error,
},
Json {
path: PathBuf,
source: Error,
},
NotALibrary(PathBuf),
Refused(String),
SaveOntoSelf(PathBuf),
Import {
path: PathBuf,
reason: String,
},
NewerLibrary {
path: PathBuf,
version: String,
},
SyncConflict(PathBuf),
Pack {
path: PathBuf,
reason: String,
},
}Expand description
Errors raised while reading or writing a library.
Variants§
Io
A filesystem operation failed.
Json
A JSON file could not be parsed or produced.
NotALibrary(PathBuf)
The folder does not look like an Eagle library.
Refused(String)
The caller won’t use a library at this place; the text says why (the app refuses one inside its own install folder, as Eagle does).
SaveOntoSelf(PathBuf)
save_to was pointed at the library’s own folder, which would copy
every file onto itself.
Import
The file cannot be imported (empty, missing, unknown folder, …).
NewerLibrary
The library was written by a newer Eagle than the one falcon
matches (crate::library::APP_VERSION); Eagle refuses to open it
and asks for an update.
SyncConflict(PathBuf)
metadata.json on disk is newer than the copy in memory: another
app or a sync tool changed it since falcon read it. The write was
refused, as Eagle refuses it; reload the library.
Pack
An .eaglepack could not be written or read.
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<Error> for AddRefusal
impl From<Error> for AddRefusal
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§
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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 more