pub enum IndexError {
Read {
path: PathBuf,
source: Error,
},
Parse {
path: PathBuf,
source: Error,
},
Serialize {
path: PathBuf,
source: Error,
},
Path {
source: PathError,
},
NoConfigDir,
}Expand description
Failure modes when loading or operating on a GlobalIndex.
Variants§
Read
I/O error reading the index file.
Parse
TOML deserialization error.
Fields
Serialize
TOML serialization error — surfaced by
GlobalIndex::save_to.
Fields
Path
One of the keys in the index did not satisfy the path convention from ADR-020 §2.
NoConfigDir
dirs::config_dir() returned None — extremely unusual on
supported platforms but worth surfacing rather than panicking.
Trait Implementations§
Source§impl Debug for IndexError
impl Debug for IndexError
Source§impl Display for IndexError
impl Display for IndexError
Source§impl Error for IndexError
impl Error for IndexError
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()
Source§impl From<IndexError> for Error
impl From<IndexError> for Error
Source§fn from(e: IndexError) -> Self
fn from(e: IndexError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for IndexError
impl !UnwindSafe for IndexError
impl Freeze for IndexError
impl Send for IndexError
impl Sync for IndexError
impl Unpin for IndexError
impl UnsafeUnpin for IndexError
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