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 at all.
Trait Implementations§
Source§impl Clone for CaptureWriter
impl Clone for CaptureWriter
Source§fn clone(&self) -> CaptureWriter
fn clone(&self) -> CaptureWriter
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 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, meter: Option<Meter>)
fn attach_metrics(&mut self, meter: Option<Meter>)
Receive a
Meter scoped spate_<component_type>_sink_* for the sink’s
own metric families, pre-labelled with the standard
pipeline/component/component_type. 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). None when the sink’s component_type cannot scope a
family: the default "custom" (reserved for pipeline-author metrics) or
a reserved root opts out silently, and a malformed value is logged and
also yields None — so declare a distinct component_type via
SinkParts::with_component_type
to receive a scope. Defaults to ignoring 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