Skip to main content

ErrorDetails

Struct ErrorDetails 

Source
pub struct ErrorDetails {
Show 17 fields pub commit_id: Option<CommitId>, pub committed_seq: Option<ChangeSeq>, pub committed_fingerprint: Option<String>, pub operation_index: Option<u32>, pub fenced_epoch: Option<WriterEpoch>, pub active_writer_epoch: Option<WriterEpoch>, pub active_writer: Option<String>, pub active_acquired_at_ms: Option<u64>, pub inode_id: Option<InodeId>, pub expected_revision: Option<RevisionNo>, pub actual_revision: Option<RevisionNo>, pub after_seq: Option<ChangeSeq>, pub retention_floor_seq: Option<ChangeSeq>, pub requested_deletion_seq: Option<ChangeSeq>, pub active_deletion_seq: Option<ChangeSeq>, pub expected_head_seq: Option<ChangeSeq>, pub actual_head_seq: Option<ChangeSeq>,
}
Expand description

Structured, machine-readable context accompanying an ApiError.

Every field is optional: a code populates the fields that apply to it (API spec, “Standard error contract”), and clients must tolerate absent fields exactly as they tolerate unknown codes. Retry decisions still key off the code; these fields carry the identity a caller needs to act — which commit to resubmit, which epoch displaced it, which revision the precondition saw.

Fields§

§commit_id: Option<CommitId>

Idempotency key of the commit the error concerns.

§committed_seq: Option<ChangeSeq>

Sequence at which that commit id already landed. Present when the failure was decided against a durable commit receipt, which is what holds the sequence; absent when nothing has committed under the id yet and two live requests are simply claiming it at once.

§committed_fingerprint: Option<String>

Semantic identity of the mutation that already landed under that commit id, from the same receipt as committed_seq and present exactly when it is. A retry recomputes this value from the request it just made — see put_retry_fingerprint — and equality is what proves the two are the same request.

§operation_index: Option<u32>

Position, in the request’s operation list, of the operation that failed. A commit applies all of its operations or none of them, so this names the one that stopped the whole request.

§fenced_epoch: Option<WriterEpoch>

Epoch the failing writer session held when it was displaced.

§active_writer_epoch: Option<WriterEpoch>

Epoch that currently owns the namespace.

§active_writer: Option<String>

Writer id recorded by the current epoch’s acquirer, when the head recorded one.

§active_acquired_at_ms: Option<u64>

Unix milliseconds at which the current epoch’s acquirer took it, when the head recorded one. Writer ids are process labels, so two runs on one machine can share one; the stamp is what tells them apart.

§inode_id: Option<InodeId>

Inode the failed precondition or operation targeted.

§expected_revision: Option<RevisionNo>

Revision the request expected to be current.

§actual_revision: Option<RevisionNo>

Revision that is actually current; absent when the inode has none.

§after_seq: Option<ChangeSeq>

Change-feed cursor the request asked to resume after.

§retention_floor_seq: Option<ChangeSeq>

Oldest sequence still promised for incremental replay.

§requested_deletion_seq: Option<ChangeSeq>

Deletion generation an undelete asked to recover.

§active_deletion_seq: Option<ChangeSeq>

Deletion generation actually active for the inode.

§expected_head_seq: Option<ChangeSeq>

Head sequence a namespace delete required the namespace to still be at.

§actual_head_seq: Option<ChangeSeq>

Head sequence the namespace was actually at, which is what a caller that still means to delete it retries against.

Trait Implementations§

Source§

impl Clone for ErrorDetails

Source§

fn clone(&self) -> ErrorDetails

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ErrorDetails

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ErrorDetails

Source§

fn default() -> ErrorDetails

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for ErrorDetails

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for ErrorDetails

Source§

impl PartialEq for ErrorDetails

Source§

fn eq(&self, other: &ErrorDetails) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for ErrorDetails

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for ErrorDetails

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.