pub enum TwoPhaseMessage {
PrepareRequest {
txn_id: TransactionId,
operations: Vec<TransactionOperation>,
},
PrepareResponse {
txn_id: TransactionId,
vote: ParticipantVote,
participant: NodeId,
},
CommitRequest {
txn_id: TransactionId,
},
CommitAck {
txn_id: TransactionId,
participant: NodeId,
},
AbortRequest {
txn_id: TransactionId,
},
AbortAck {
txn_id: TransactionId,
participant: NodeId,
},
StatusQuery {
txn_id: TransactionId,
},
StatusResponse {
txn_id: TransactionId,
state: TransactionState,
},
}Expand description
Messages for 2PC protocol.
Variants§
PrepareRequest
Prepare request from coordinator.
PrepareResponse
Prepare response from participant.
CommitRequest
Commit request from coordinator.
Fields
§
txn_id: TransactionIdCommitAck
Commit acknowledgment from participant.
AbortRequest
Abort request from coordinator.
Fields
§
txn_id: TransactionIdAbortAck
Abort acknowledgment from participant.
StatusQuery
Query transaction status (for recovery).
Fields
§
txn_id: TransactionIdStatusResponse
Status response.
Trait Implementations§
Source§impl Clone for TwoPhaseMessage
impl Clone for TwoPhaseMessage
Source§fn clone(&self) -> TwoPhaseMessage
fn clone(&self) -> TwoPhaseMessage
Returns a duplicate of the value. Read more
1.0.0 · 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 TwoPhaseMessage
impl Debug for TwoPhaseMessage
Source§impl<'de> Deserialize<'de> for TwoPhaseMessage
impl<'de> Deserialize<'de> for TwoPhaseMessage
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for TwoPhaseMessage
impl RefUnwindSafe for TwoPhaseMessage
impl Send for TwoPhaseMessage
impl Sync for TwoPhaseMessage
impl Unpin for TwoPhaseMessage
impl UnsafeUnpin for TwoPhaseMessage
impl UnwindSafe for TwoPhaseMessage
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