pub trait ShardWriter:
Send
+ Sync
+ 'static {
type Endpoint: Send + Sync + 'static;
// Required method
fn write_batch(
&self,
endpoint: &Self::Endpoint,
batch: &SealedBatch,
) -> impl Future<Output = Result<(), SinkError>> + Send;
// Provided method
fn probe(
&self,
endpoint: &Self::Endpoint,
) -> impl Future<Output = Result<(), SinkError>> + Send { ... }
}Expand description
The I/O half of a sink connector: writes one sealed batch to one
replica endpoint. Returning Ok is the durable-ack point — only then
may the framework resolve the batch’s acknowledgements.
Required Associated Types§
Required Methods§
Sourcefn write_batch(
&self,
endpoint: &Self::Endpoint,
batch: &SealedBatch,
) -> impl Future<Output = Result<(), SinkError>> + Send
fn write_batch( &self, endpoint: &Self::Endpoint, batch: &SealedBatch, ) -> impl Future<Output = Result<(), SinkError>> + Send
Write batch to endpoint durably.
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.