#[non_exhaustive]pub enum OpError {
Show 16 variants
NotFound(BeadId),
AlreadyExists(BeadId),
AlreadyClaimed {
by: ActorId,
expires: Option<WallClock>,
},
CasMismatch {
expected: String,
actual: String,
},
InvalidTransition {
from: String,
to: String,
},
ValidationFailed {
field: String,
reason: String,
},
NotAGitRepo(PathBuf),
NoRemote(PathBuf),
RepoNotInitialized(PathBuf),
Sync(SyncError),
BeadDeleted(BeadId),
Wal(WalError),
WalMerge {
errors: Vec<CoreError>,
},
NotClaimedByYou,
DepNotFound,
Internal(&'static str),
}Expand description
Errors that can occur during operations.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
NotFound(BeadId)
AlreadyExists(BeadId)
AlreadyClaimed
CasMismatch
InvalidTransition
ValidationFailed
NotAGitRepo(PathBuf)
NoRemote(PathBuf)
RepoNotInitialized(PathBuf)
Sync(SyncError)
BeadDeleted(BeadId)
Wal(WalError)
WalMerge
NotClaimedByYou
DepNotFound
Internal(&'static str)
Implementations§
Source§impl OpError
impl OpError
Sourcepub fn transience(&self) -> Transience
pub fn transience(&self) -> Transience
Whether retrying this operation may succeed.
Source§impl OpError
impl OpError
Sourcepub fn from_live_lookup(err: LiveLookupError, id: BeadId) -> Self
pub fn from_live_lookup(err: LiveLookupError, id: BeadId) -> Self
Convert a LiveLookupError to OpError with the given bead ID.
Trait Implementations§
Source§impl Error for OpError
impl Error for OpError
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<OpError> for ErrorPayload
impl From<OpError> for ErrorPayload
Auto Trait Implementations§
impl Freeze for OpError
impl !RefUnwindSafe for OpError
impl Send for OpError
impl Sync for OpError
impl Unpin for OpError
impl !UnwindSafe for OpError
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