pub(crate) trait Staged: Send {
type Ctx: StagedContext;
// Required methods
fn validity(&mut self) -> &mut PlanValidity;
async fn stage(
self,
coord: &mut Coordinator,
ctx: &mut Self::Ctx,
) -> Result<StageResult<Box<Self>>, AdapterError>;
fn message(self, ctx: Self::Ctx, span: Span) -> Message;
fn cancel_enabled(&self) -> bool;
}Expand description
Common functionality for Coordinator::sequence_staged.
Required Associated Types§
type Ctx: StagedContext
Required Methods§
fn validity(&mut self) -> &mut PlanValidity
Sourceasync fn stage(
self,
coord: &mut Coordinator,
ctx: &mut Self::Ctx,
) -> Result<StageResult<Box<Self>>, AdapterError>
async fn stage( self, coord: &mut Coordinator, ctx: &mut Self::Ctx, ) -> Result<StageResult<Box<Self>>, AdapterError>
Returns the next stage or final result.
Sourcefn message(self, ctx: Self::Ctx, span: Span) -> Message
fn message(self, ctx: Self::Ctx, span: Span) -> Message
Prepares a message for the Coordinator.
Sourcefn cancel_enabled(&self) -> bool
fn cancel_enabled(&self) -> bool
Whether it is safe to SQL cancel this stage.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".