pub struct TransactedSegment {
pub datasource: String,
pub block_timeout: Duration,
pub manager: Arc<dyn TransactionManager>,
pub body: OutcomeSegment,
/* private fields */
}Expand description
Outcome-aware structural segment for a transacted { datasource } block.
Operates at the PipelineOutcome layer so a clean Stopped from the
body propagates unchanged per ADR-0025 — a Stop is successful control
flow and MUST NOT become a rollback report (604c R2).
Fields§
§datasource: StringDatasource the block is transacted on; names every typed error.
block_timeout: DurationBlock deadline measured from entry; default DEFAULT_BLOCK_TIMEOUT,
per-block override through TransactedSegment::with_block_timeout.
manager: Arc<dyn TransactionManager>Open seam: open_session() checks out + hygienizes the connection
(lazy — BEGIN is never sent here). Resolved above this segment.
body: OutcomeSegmentThe block body pipeline.
Implementations§
Source§impl TransactedSegment
impl TransactedSegment
Sourcepub fn new(
datasource: impl Into<String>,
manager: Arc<dyn TransactionManager>,
body: OutcomeSegment,
) -> Self
pub fn new( datasource: impl Into<String>, manager: Arc<dyn TransactionManager>, body: OutcomeSegment, ) -> Self
Build a segment on datasource with the default block timeout.
Sourcepub fn with_block_timeout(self, block_timeout: Duration) -> Self
pub fn with_block_timeout(self, block_timeout: Duration) -> Self
Override the block deadline (frozen spec “Block timeout”: per-block override of the 30 s default).
Sourcepub async fn run(&mut self, exchange: Exchange) -> PipelineOutcome
pub async fn run(&mut self, exchange: Exchange) -> PipelineOutcome
Run the block with a runtime-allocated scope id.
Sourcepub async fn run_with_scope(
&mut self,
exchange: Exchange,
scope: JoinScope,
) -> PipelineOutcome
pub async fn run_with_scope( &mut self, exchange: Exchange, scope: JoinScope, ) -> PipelineOutcome
Run the block with a caller-chosen scope id.
The seam the executor (step 9) uses once joined sql steps carry a
loader-baked scope: the installed BlockSession must carry the SAME
id the joined steps compare against.
Trait Implementations§
Source§impl Clone for TransactedSegment
impl Clone for TransactedSegment
Source§impl OutcomePipeline for TransactedSegment
impl OutcomePipeline for TransactedSegment
Source§fn clone_box(&self) -> Box<dyn OutcomePipeline>
fn clone_box(&self) -> Box<dyn OutcomePipeline>
Box<dyn OutcomePipeline> cannot directly derive Clone.