pub struct RunStreamOptions {Show 16 fields
pub state_store: Option<Arc<dyn StateStore>>,
pub state_key: Option<String>,
pub pipeline_name: Option<String>,
pub row: Option<String>,
pub run_id: Option<String>,
pub dlq: Option<DlqConfig>,
pub quality: Option<Arc<CompiledQuality>>,
pub contract: Option<Arc<CompiledContract>>,
pub masking: Option<Arc<CompiledMasking>>,
pub adaptive: Option<AdaptiveBatchConfig>,
pub cancel: Option<CancellationToken>,
pub delivery: DeliveryMode,
pub start_seq: u64,
pub replay: Option<ReplayGuarantee>,
pub resilience: Option<ResiliencePolicy>,
pub schema_drift: Option<SchemaDriftPolicy>,
}Fields§
§state_store: Option<Arc<dyn StateStore>>§state_key: Option<String>§pipeline_name: Option<String>§row: Option<String>§run_id: Option<String>§dlq: Option<DlqConfig>§quality: Option<Arc<CompiledQuality>>quality only.contract: Option<Arc<CompiledContract>>contract only.Compiled data contract (issue #204). The pass runs per page after the quality pass and before the schema-drift pass.
masking: Option<Arc<CompiledMasking>>masking only.Compiled masking policy (issue #206). The pass runs per page first — before quality/contract/drift and every sink write — so PII never reaches a sink, the DLQ, or a lineage sample unmasked.
adaptive: Option<AdaptiveBatchConfig>Adaptive batch-size controller config; None (or enabled = false)
leaves the per-page write path unchanged.
cancel: Option<CancellationToken>Cooperative cancellation. When set and cancelled mid-run, the streaming loop stops polling new pages, flushes the sinks (so a buffered sink like Parquet writes its footer / completes its upload rather than orphaning the file), and returns the partial result. Without this, a dropped run future loses everything written-but-unflushed (#146 H16).
delivery: DeliveryModeDelivery guarantee. AtLeastOnce (default) leaves the write path
unchanged. ExactlyOnce enables the resume/skip + atomic-token path.
start_seq: u64Resume sequence read from the (unwrapped) exactly-once state value.
Ignored unless delivery == ExactlyOnce. Defaults to 0.
replay: Option<ReplayGuarantee>The source’s replay capability, when the caller knows it.
Some(NonDeterministic) steers an ExactlyOnce run away from the
atomic-watermark skip path (whose correctness depends on positional
replay) and onto the keyed-upsert mechanism when the sink is configured
for it. None (default) trusts the caller — today’s behaviour for
library users driving run_stream directly. Pipeline::run always
sets it from Source::replay_guarantee().
resilience: Option<ResiliencePolicy>Optional resilience policy (retry/backoff/circuit-breaker/poison).
schema_drift: Option<SchemaDriftPolicy>Compiled schema-drift policy (issue #194). None → no drift handling.
Implementations§
Source§impl RunStreamOptions
impl RunStreamOptions
pub fn new() -> Self
pub fn with_state( self, store: Arc<dyn StateStore>, key: impl Into<String>, ) -> Self
pub fn with_name(self, name: impl Into<String>) -> Self
pub fn with_row(self, row: impl Into<String>) -> Self
pub fn with_run_id(self, id: impl Into<String>) -> Self
pub fn with_dlq(self, dlq: DlqConfig) -> Self
Sourcepub fn with_cancel(self, cancel: CancellationToken) -> Self
pub fn with_cancel(self, cancel: CancellationToken) -> Self
Attach a cancellation token for cooperative, flush-completing cancel.
Sourcepub fn with_adaptive(self, cfg: AdaptiveBatchConfig) -> Self
pub fn with_adaptive(self, cfg: AdaptiveBatchConfig) -> Self
Attach an adaptive batch-size controller config.
pub fn with_quality(self, quality: Arc<CompiledQuality>) -> Self
quality only.Sourcepub fn with_contract(self, contract: Arc<CompiledContract>) -> Self
Available on crate feature contract only.
pub fn with_contract(self, contract: Arc<CompiledContract>) -> Self
contract only.Attach a compiled data contract. The pass runs per page after the quality pass and before the schema-drift pass.
Sourcepub fn with_masking(self, masking: Arc<CompiledMasking>) -> Self
Available on crate feature masking only.
pub fn with_masking(self, masking: Arc<CompiledMasking>) -> Self
masking only.Attach a compiled masking policy. The pass runs per page first — before quality/contract/drift and every sink write.
Sourcepub fn with_delivery(self, mode: DeliveryMode) -> Self
pub fn with_delivery(self, mode: DeliveryMode) -> Self
Set the delivery mode.
Sourcepub fn with_replay_guarantee(self, replay: ReplayGuarantee) -> Self
pub fn with_replay_guarantee(self, replay: ReplayGuarantee) -> Self
Set the resume sequence (exactly-once). Normally derived by
Pipeline::run from the unwrapped state value.
Declare the source’s replay capability (see the replay field).
pub fn with_start_seq(self, seq: u64) -> Self
Sourcepub fn with_resilience(self, policy: ResiliencePolicy) -> Self
pub fn with_resilience(self, policy: ResiliencePolicy) -> Self
Attach a resilience policy to the run.
Sourcepub fn with_schema_drift(self, policy: SchemaDriftPolicy) -> Self
pub fn with_schema_drift(self, policy: SchemaDriftPolicy) -> Self
Attach a compiled schema-drift policy. The pass runs per page after the quality pass and before the sink write.
Trait Implementations§
Source§impl Clone for RunStreamOptions
impl Clone for RunStreamOptions
Source§fn clone(&self) -> RunStreamOptions
fn clone(&self) -> RunStreamOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Default for RunStreamOptions
impl Default for RunStreamOptions
Source§fn default() -> RunStreamOptions
fn default() -> RunStreamOptions
Auto Trait Implementations§
impl !RefUnwindSafe for RunStreamOptions
impl !UnwindSafe for RunStreamOptions
impl Freeze for RunStreamOptions
impl Send for RunStreamOptions
impl Sync for RunStreamOptions
impl Unpin for RunStreamOptions
impl UnsafeUnpin for RunStreamOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request