pub trait ProtocolExecutor {
type PreparedData: Clone + Debug + Send + Sync;
// Required method
fn execute(
&mut self,
data: &Self::PreparedData,
context: &ExecutionContext,
) -> impl Future<Output = Result<RawExecutionResult>> + Send;
}Expand description
Contract implemented by all protocol executors.
Each protocol crate provides an executor struct that implements this trait.
The associated PreparedData type links the executor to its matching
prepared data produced by the builder.
Required Associated Types§
Required Methods§
Sourcefn execute(
&mut self,
data: &Self::PreparedData,
context: &ExecutionContext,
) -> impl Future<Output = Result<RawExecutionResult>> + Send
fn execute( &mut self, data: &Self::PreparedData, context: &ExecutionContext, ) -> impl Future<Output = Result<RawExecutionResult>> + Send
Execute a single protocol request and return the raw result.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.