pub struct WorkerBatch {
pub state_version: CommitVersion,
pub instructions: Vec<FlowInstruction>,
}Expand description
A batch of instructions for a single worker.
Contains instructions for multiple flows, all of which are assigned to the same worker via hash partitioning (flow_id % num_workers).
Fields§
§state_version: CommitVersionThe version to use for reading flow state. This is constant for the entire CDC batch being processed.
instructions: Vec<FlowInstruction>Instructions for each flow assigned to this worker. Each flow appears at most once in this list.
Implementations§
Source§impl WorkerBatch
impl WorkerBatch
Sourcepub fn new(state_version: CommitVersion) -> Self
pub fn new(state_version: CommitVersion) -> Self
Create a new empty worker batch.
Sourcepub fn add_instruction(&mut self, instruction: FlowInstruction)
pub fn add_instruction(&mut self, instruction: FlowInstruction)
Add an instruction to this batch.
Trait Implementations§
Source§impl Clone for WorkerBatch
impl Clone for WorkerBatch
Source§fn clone(&self) -> WorkerBatch
fn clone(&self) -> WorkerBatch
Returns a duplicate of the value. Read more
1.0.0 · 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 WorkerBatch
impl RefUnwindSafe for WorkerBatch
impl Send for WorkerBatch
impl Sync for WorkerBatch
impl Unpin for WorkerBatch
impl UnsafeUnpin for WorkerBatch
impl UnwindSafe for WorkerBatch
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more