pub enum Error {
Contended {
resource: String,
},
Timeout {
resource: String,
waited: Duration,
},
StaleToken {
resource: String,
token: u64,
current: u64,
},
LeaseExpired {
resource: String,
},
Cluster(String),
Config(String),
}Expand description
Errors that can occur while acquiring, renewing, or releasing a lock.
Variants§
Contended
The lock is currently held by another owner and could not be acquired within the allotted time / attempts.
Timeout
The acquire attempt exceeded the configured wait budget.
Fields
StaleToken
A renew or release referenced a fencing token the backend no longer recognises — typically because the lease already expired and was re-acquired by someone else.
Fields
LeaseExpired
The lock’s lease expired locally before it could be renewed — the guard is now poisoned and its fencing token must not be trusted.
Cluster(String)
A cluster / transport level failure (network partition, no reachable nodes, RPC error, …).
Config(String)
Configuration was rejected (e.g. empty seed list, zero TTL).
Trait Implementations§
Source§impl Error for Error
impl Error for Error
1.30.0 · 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 Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl UnwindSafe for Error
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