pub struct CaptureWriter { /* private fields */ }Expand description
A ShardWriter that records every attempt and resolves it according
to the paired SinkScript (default: success). Unscripted writes
succeed, so happy-path tests need no scripting.
Trait Implementations§
Source§impl Clone for CaptureWriter
impl Clone for CaptureWriter
Source§impl Debug for CaptureWriter
impl Debug for CaptureWriter
Source§impl ShardWriter for CaptureWriter
impl ShardWriter for CaptureWriter
Source§type Endpoint = ReplicaTag
type Endpoint = ReplicaTag
A connected replica endpoint (e.g. one HTTP client per replica).
Source§fn attach_metrics(&mut self, cx: SinkMetricsCtx)
fn attach_metrics(&mut self, cx: SinkMetricsCtx)
Receive the
SinkMetricsCtx for the writer’s own metric families.
Called once by the builder before the writer is shared across shard
workers; resolve handles here and store them (they are Arc-backed, so
write_batch’s &self can touch them). See SinkMetricsCtx::meter
for when it carries no Meter. The default ignores it.Source§fn write_batch(
&self,
endpoint: &ReplicaTag,
batch: &SealedBatch,
) -> impl Future<Output = Result<(), SinkError>> + Send
fn write_batch( &self, endpoint: &ReplicaTag, batch: &SealedBatch, ) -> impl Future<Output = Result<(), SinkError>> + Send
Auto Trait Implementations§
impl Freeze for CaptureWriter
impl RefUnwindSafe for CaptureWriter
impl Send for CaptureWriter
impl Sync for CaptureWriter
impl Unpin for CaptureWriter
impl UnsafeUnpin for CaptureWriter
impl UnwindSafe for CaptureWriter
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