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)
Sourcepub fn enqueue_for(&self, shard: usize, replica: usize, outcome: WriteOutcome)
pub fn enqueue_for(&self, shard: usize, replica: usize, outcome: WriteOutcome)
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 the order they started.
An attempt reads Pending until its write
resolves.
Sourcepub fn release_held(&self)
pub fn release_held(&self)
Release every write currently held by a
held outcome.
A held outcome that a later write consumes holds again until the next call.
Sourcepub fn held_writes(&self) -> usize
pub fn held_writes(&self) -> usize
How many writes are waiting on release_held.
Trait Implementations§
Source§impl Clone for SinkScript
impl Clone for SinkScript
Auto 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