pub trait Client {
// Required methods
fn propose(
&self,
payload: Vec<u8>,
) -> impl Future<Output = Result<Vec<u8>, ClientError>> + Send;
fn query(
&self,
payload: Vec<u8>,
) -> impl Future<Output = Result<Vec<u8>, ClientError>> + Send;
}Expand description
A cluster client: submit an application-encoded write (propose) or
linearizable read (query) and get the application-encoded response back.
The raw-bytes layer shared by the remote HTTP/3 client and any in-process
adapter; TypedClient wraps it with a
StateMachine’s command/query/response types.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".