pub trait TwoPhaseClient: KeyedClient {
// Required methods
fn prepare_keyed(
&self,
tx_id: Vec<u8>,
key: Vec<u8>,
command: Vec<u8>,
) -> impl Future<Output = Result<Vec<u8>, ClientError>> + Send;
fn commit_keyed(
&self,
tx_id: Vec<u8>,
key: Vec<u8>,
) -> impl Future<Output = Result<Vec<u8>, ClientError>> + Send;
fn abort_keyed(
&self,
tx_id: Vec<u8>,
key: Vec<u8>,
) -> impl Future<Output = Result<Vec<u8>, ClientError>> + Send;
}Expand description
Extension of KeyedClient for limited cross-shard 2PC.
Required Methods§
Sourcefn prepare_keyed(
&self,
tx_id: Vec<u8>,
key: Vec<u8>,
command: Vec<u8>,
) -> impl Future<Output = Result<Vec<u8>, ClientError>> + Send
fn prepare_keyed( &self, tx_id: Vec<u8>, key: Vec<u8>, command: Vec<u8>, ) -> impl Future<Output = Result<Vec<u8>, ClientError>> + Send
Stage a command on the shard for key under tx_id.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".