pub struct SinkScript { /* private fields */ }Expand description
Scripts outcomes for a CaptureWriter and reads back its captures.
Cloneable; all clones address the same writer.
Implementations§
Source§impl SinkScript
impl SinkScript
Sourcepub fn enqueue_global(&self, outcome: WriteOutcome)
pub fn enqueue_global(&self, outcome: WriteOutcome)
Queue an outcome consumed by the next otherwise-unscripted write to any endpoint (FIFO). Endpoint-specific scripts take precedence.
Sourcepub fn enqueue_for(&self, shard: usize, replica: usize, outcome: WriteOutcome)
pub fn enqueue_for(&self, shard: usize, replica: usize, outcome: WriteOutcome)
Queue an outcome for the next write to (shard, replica) (FIFO).
Sourcepub fn fail_probe(
&self,
shard: usize,
replica: usize,
reason: impl Into<String>,
)
pub fn fail_probe( &self, shard: usize, replica: usize, reason: impl Into<String>, )
Make ShardWriter::probe of (shard, replica) fail with a
retryable error until heal_probe.
Sourcepub fn heal_probe(&self, shard: usize, replica: usize)
pub fn heal_probe(&self, shard: usize, replica: usize)
Let (shard, replica)’s probe succeed again.
Sourcepub fn writes(&self) -> Vec<CapturedWrite>
pub fn writes(&self) -> Vec<CapturedWrite>
Every write attempt so far, in order.
Trait Implementations§
Source§impl Clone for SinkScript
impl Clone for SinkScript
Source§fn clone(&self) -> SinkScript
fn clone(&self) -> SinkScript
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 moreAuto Trait Implementations§
impl Freeze for SinkScript
impl RefUnwindSafe for SinkScript
impl Send for SinkScript
impl Sync for SinkScript
impl Unpin for SinkScript
impl UnsafeUnpin for SinkScript
impl UnwindSafe for SinkScript
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