pub enum AddError {
NotAFile(Utf8PathBuf),
Symlink(Utf8PathBuf),
Io {
path: Utf8PathBuf,
source: Error,
},
NotAPdf(Utf8PathBuf),
TooLarge {
path: Utf8PathBuf,
actual: u64,
cap: u64,
},
AlreadyStored {
ref_: String,
path: Utf8PathBuf,
},
NamesAnotherWork {
stem: String,
ref_: String,
},
Resolve {
ref_: String,
source: FetchError,
},
Store(FetchError),
UnreadableEntry {
ref_: String,
source: StoreError,
},
}Expand description
Why a file was not added.
Variants§
NotAFile(Utf8PathBuf)
Not a regular file (missing, a directory, a device, …).
Symlink(Utf8PathBuf)
A symlink: resolved elsewhere, it is not the file the user named.
Io
Reading the file failed.
NotAPdf(Utf8PathBuf)
The first bytes are not %PDF- – the same check a fetch makes.
TooLarge
Larger than a fetch would accept.
AlreadyStored
The store already holds a PDF for this ref.
NamesAnotherWork
The file name is another work’s id.
Resolve
The ref’s metadata could not be resolved (and the store had none).
Store(FetchError)
The store write failed.
UnreadableEntry
The store has an entry for the ref that cannot be read. Writing over it would drop its tags, collections and annotation unseen.
Trait Implementations§
Source§impl Error for AddError
impl Error for AddError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
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
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl !RefUnwindSafe for AddError
impl !UnwindSafe for AddError
impl Freeze for AddError
impl Send for AddError
impl Sync for AddError
impl Unpin for AddError
impl UnsafeUnpin for AddError
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
Mutably borrows from an owned value. Read more