pub struct AgentPrewriteRequest {
pub cf: u32,
pub key: Vec<u8>,
pub primary_ref: Vec<u8>,
pub start_ts: u64,
pub ttl_ms: u64,
pub fence: u64,
pub value: Vec<u8>,
pub delete: bool,
pub read_only: bool,
}Fields§
§cf: u32target CF of the user key
key: Vec<u8>user key being prewritten
primary_ref: Vec<u8>the txn’s primary key (every secondary points back)
start_ts: u64HLC start_ts (packed u64), from Phase 1
ttl_ms: u64lock TTL in milliseconds
fence: u64primary claim’s fencing token
value: Vec<u8>provisional value for a Put (ignored when delete)
delete: booltrue = Delete intent (the value field is ignored)
read_only: booltrue = READ intent: lock the key so no concurrent transaction can commit
over it, stage nothing, and release (not roll forward) at commit. This is
how a cross-shard transaction detects READ-WRITE conflicts; value and
delete are ignored. Re-reading the key before commit would not do — a
concurrent txn could commit between the check and the primary CAS.
Trait Implementations§
Source§impl Clone for AgentPrewriteRequest
impl Clone for AgentPrewriteRequest
Source§fn clone(&self) -> AgentPrewriteRequest
fn clone(&self) -> AgentPrewriteRequest
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AgentPrewriteRequest
impl Debug for AgentPrewriteRequest
Source§impl Default for AgentPrewriteRequest
impl Default for AgentPrewriteRequest
Source§impl Message for AgentPrewriteRequest
impl Message for AgentPrewriteRequest
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(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
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(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
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(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes an instance of the message from a buffer. Read more
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes a length-delimited instance of the message from the buffer.
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes an instance of the message from a buffer, and merges it into
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes a length-delimited instance of the message from buffer, and
merges it into
self.Source§impl PartialEq for AgentPrewriteRequest
impl PartialEq for AgentPrewriteRequest
impl StructuralPartialEq for AgentPrewriteRequest
Auto Trait Implementations§
impl Freeze for AgentPrewriteRequest
impl RefUnwindSafe for AgentPrewriteRequest
impl Send for AgentPrewriteRequest
impl Sync for AgentPrewriteRequest
impl Unpin for AgentPrewriteRequest
impl UnsafeUnpin for AgentPrewriteRequest
impl UnwindSafe for AgentPrewriteRequest
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> 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