pub struct ProtoKeyError {
pub locked: Option<LockInfo>,
pub retryable: String,
pub abort: String,
pub conflict: Option<WriteConflict>,
pub already_exist: Option<AlreadyExist>,
pub deadlock: Option<Deadlock>,
pub commit_ts_expired: Option<CommitTsExpired>,
pub txn_not_found: Option<TxnNotFound>,
pub commit_ts_too_large: Option<CommitTsTooLarge>,
pub assertion_failed: Option<AssertionFailed>,
pub primary_mismatch: Option<PrimaryMismatch>,
}Expand description
Protobuf-generated per-key error returned by TiKV.
This type is generated from TiKV’s protobuf definitions and may change in a future release even if the wire format is compatible.
Fields§
§locked: Option<LockInfo>Client should backoff or cleanup the lock then retry.
retryable: StringClient may restart the txn. e.g write conflict.
abort: StringClient should abort the txn.
conflict: Option<WriteConflict>Write conflict is moved from retryable to here.
already_exist: Option<AlreadyExist>Key already exists
deadlock: Option<Deadlock>Deadlock is used in pessimistic transaction for single statement rollback.
commit_ts_expired: Option<CommitTsExpired>Commit ts is earlier than min commit ts of a transaction.
txn_not_found: Option<TxnNotFound>Txn not found when checking txn status.
commit_ts_too_large: Option<CommitTsTooLarge>Calculated commit TS exceeds the limit given by the user.
assertion_failed: Option<AssertionFailed>Assertion of a Mutation is evaluated as a failure.
primary_mismatch: Option<PrimaryMismatch>CheckTxnStatus is sent to a lock that’s not the primary.
Trait Implementations§
Source§impl From<KeyError> for Error
impl From<KeyError> for Error
Source§fn from(e: ProtoKeyError) -> Error
fn from(e: ProtoKeyError) -> Error
Converts to this type from the input type.
Source§impl Message for KeyError
impl Message for KeyError
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Encodes the message to a buffer. Read more
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message to a newly allocated buffer.
Source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Encodes the message with a length-delimiter to a buffer. Read more
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message with a length-delimiter to a newly allocated buffer.
Source§fn decode<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
Decodes an instance of the message from a buffer. Read more
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
Decodes a length-delimited instance of the message from the buffer.
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
Decodes an instance of the message from a buffer, and merges it into
self. Read moreSource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
Decodes a length-delimited instance of the message from buffer, and
merges it into
self.impl StructuralPartialEq for KeyError
Auto Trait Implementations§
impl Freeze for KeyError
impl RefUnwindSafe for KeyError
impl Send for KeyError
impl Sync for KeyError
impl Unpin for KeyError
impl UnwindSafe for KeyError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request