pub enum OpLogWriteError {
Serialize(Error),
HashObject {
stderr: String,
exit_code: Option<i32>,
},
InvalidOid {
raw: String,
},
Io(Error),
CasMismatch {
workspace_id: WorkspaceId,
},
RefError(RefError),
}Expand description
Errors that can occur during an op log write.
Variants§
Serialize(Error)
Serializing the operation to canonical JSON failed.
HashObject
git hash-object -w --stdin failed or returned unexpected output.
InvalidOid
The OID returned by git hash-object was malformed.
Io(Error)
I/O error (e.g. spawning git, writing to its stdin).
CasMismatch
CAS failed: the head ref was modified between read and write.
With the single-writer invariant this should never happen. If it does, it indicates a bug or a broken invariant upstream.
Fields
§
workspace_id: WorkspaceIdThe workspace whose head ref could not be updated.
RefError(RefError)
A lower-level ref operation (other than CAS mismatch) failed.
Trait Implementations§
Source§impl Debug for OpLogWriteError
impl Debug for OpLogWriteError
Source§impl Display for OpLogWriteError
impl Display for OpLogWriteError
Source§impl Error for OpLogWriteError
impl Error for OpLogWriteError
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 OpLogWriteError
impl From<Error> for OpLogWriteError
Source§impl From<OpLogWriteError> for CheckpointError
impl From<OpLogWriteError> for CheckpointError
Source§fn from(e: OpLogWriteError) -> Self
fn from(e: OpLogWriteError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for OpLogWriteError
impl !RefUnwindSafe for OpLogWriteError
impl Send for OpLogWriteError
impl Sync for OpLogWriteError
impl Unpin for OpLogWriteError
impl UnsafeUnpin for OpLogWriteError
impl !UnwindSafe for OpLogWriteError
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