///|
/// Failures raised while reading, validating, or publishing persisted index
/// state.
pub(all) suberror PersistenceError {
Closed
NotFound(String)
InvalidName(String)
InvalidFormat(String)
LockBusy(String)
AlreadyPrepared
NotPrepared
Io(String)
} derive(Eq, @debug.Debug)
///|
pub impl Show for PersistenceError with fn output(self, logger) {
match self {
Closed => logger.write_string("index handle is closed")
NotFound(name) => logger.write_string("index file not found: \{name}")
InvalidName(name) => logger.write_string("invalid index file name: \{name}")
InvalidFormat(message) =>
logger.write_string("invalid index format: \{message}")
LockBusy(name) => logger.write_string("index writer lock is busy: \{name}")
AlreadyPrepared =>
logger.write_string("an index commit is already prepared")
NotPrepared => logger.write_string("no index commit is prepared")
Io(message) => logger.write_string("index I/O error: \{message}")
}
}