pub enum LibraryError {
AlreadyExists(PathBuf),
DirectoryNotEmpty,
CorruptVersion(String),
Locked {
pid: u32,
hostname: String,
locked_at: i64,
},
VersionMismatch {
found: u8,
expected: u8,
},
CatalogTooNew {
found: u32,
supported: u32,
},
Io(Error),
Db(Error),
Cbor(String),
}Variants§
AlreadyExists(PathBuf)
DirectoryNotEmpty
CorruptVersion(String)
Locked
VersionMismatch
CatalogTooNew
The catalog (index/library.sqlite) was stamped by a newer build than this one.
A refusal, not a downgrade: the catalog is left byte-for-byte untouched and the lock
is released, because an older binary cannot know what invariants the newer schema
added. The recovery is to update Capsule (SSoT: Versioning — Client Catalog
Migration). Typed here rather than flattened into Db so a client can
tell the user which two versions disagree.
Io(Error)
Db(Error)
Cbor(String)
Trait Implementations§
Source§impl Debug for LibraryError
impl Debug for LibraryError
Source§impl Display for LibraryError
impl Display for LibraryError
Source§impl Error for LibraryError
impl Error for LibraryError
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<Error> for LibraryError
impl From<Error> for LibraryError
Source§impl From<Error> for LibraryError
impl From<Error> for LibraryError
Source§impl From<LibraryError> for StreamingError
impl From<LibraryError> for StreamingError
Source§fn from(source: LibraryError) -> Self
fn from(source: LibraryError) -> Self
Converts to this type from the input type.
Source§impl From<LibraryError> for LifecycleError
impl From<LibraryError> for LifecycleError
Source§fn from(source: LibraryError) -> Self
fn from(source: LibraryError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for LibraryError
impl !UnwindSafe for LibraryError
impl Freeze for LibraryError
impl Send for LibraryError
impl Sync for LibraryError
impl Unpin for LibraryError
impl UnsafeUnpin for LibraryError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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