#[non_exhaustive]pub enum Error {
Show 18 variants
Sqlite(Error),
ObjectStore(Error),
WalParse {
offset: u64,
detail: String,
},
WalChecksum {
frame: u32,
stored_1: u32,
computed_1: u32,
stored_2: u32,
computed_2: u32,
},
Restore(String),
Io(Error),
Replication(String),
ManifestConflict {
local_gen: u64,
remote_gen: u64,
},
Snapshot(String),
Config(String),
Serialization(Error),
Join(JoinError),
Other(String),
PreconditionFailed {
key: String,
expected: String,
},
Compaction(String),
DatabaseLocked {
path: PathBuf,
holder_pid: u32,
},
ReplicaLocked {
prefix: String,
holder_pid: u32,
holder_hostname: String,
last_heartbeat: String,
},
WrongWriter {
prefix: String,
expected_writer: String,
actual_writer: String,
},
}Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Sqlite(Error)
ObjectStore(Error)
WalParse
WalChecksum
Restore(String)
Io(Error)
Replication(String)
ManifestConflict
Snapshot(String)
Config(String)
Serialization(Error)
Join(JoinError)
Other(String)
PreconditionFailed
Compaction(String)
DatabaseLocked
ReplicaLocked
WrongWriter
This bucket prefix belongs to another server. Your writer_id does not match writer.json in the bucket. This means you should NOT open this prefix at all — not for writing, not for reading, not for anything.
Each bucket prefix has exactly ONE owner. If you need data from this prefix,
use the CLI wal-backup restore to a separate location, or give this
server its own prefix.
Implementations§
Source§impl Error
impl Error
pub fn is_not_found(&self) -> bool
pub fn is_io_not_found(&self) -> bool
Sourcepub fn is_retryable(&self) -> bool
pub fn is_retryable(&self) -> bool
Returns true if the error is transient and the operation should be retried. Fatal errors (precondition failures, manifest conflicts) return false.
Sourcepub fn is_database_locked(&self) -> bool
pub fn is_database_locked(&self) -> bool
Returns true if this error is because another process holds the local DB lock.
Sourcepub fn is_replica_locked(&self) -> bool
pub fn is_replica_locked(&self) -> bool
Returns true if this error is because another process holds the bucket replica lock.
pub fn is_wrong_writer(&self) -> bool
Sourcepub fn is_precondition_failed(&self) -> bool
pub fn is_precondition_failed(&self) -> bool
Returns true if this error is a precondition failure (CAS/conditional write conflict).
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()
Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Forget for Error
impl Freeze for Error
impl Move for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
Blanket Implementations§
Source§impl<T> AsErrorSource for Twhere
T: Error + 'static,
impl<T> AsErrorSource for Twhere
T: Error + 'static,
Source§fn as_error_source(&self) -> &(dyn Error + 'static)
fn as_error_source(&self) -> &(dyn Error + 'static)
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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> ⓘ
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