pub struct StaticExecutionAdapter { /* private fields */ }Expand description
The StaticExecutionAdapter to wrap TransactionHandlers
This struct takes a series of transaction handlers which can be used to execution transactions. These transactions are executed on a single background thread.
Implementations§
Source§impl StaticExecutionAdapter
impl StaticExecutionAdapter
Sourcepub fn new_adapter(
handlers: Vec<Box<dyn TransactionHandler>>,
context_manager: ContextManager,
) -> Result<Self, ExecutionAdapterError>
pub fn new_adapter( handlers: Vec<Box<dyn TransactionHandler>>, context_manager: ContextManager, ) -> Result<Self, ExecutionAdapterError>
Creates a new adapter, if possible.
Creates a StaticExecutionAdapter wrapping the given TransactionHandler vector and a
ContextManager instance. This adapter will dispatch transaction pairs to the appropriate
handler, if found.
§Errors
ExecutionAdapterError is returned if the background thread cannot be created.
Trait Implementations§
Source§impl ExecutionAdapter for StaticExecutionAdapter
impl ExecutionAdapter for StaticExecutionAdapter
fn start( &mut self, execution_registry: Box<dyn ExecutionRegistry>, ) -> Result<(), ExecutionOperationError>
Source§fn execute(
&self,
transaction_pair: TransactionPair,
context_id: ContextId,
on_done: Box<dyn Fn(Result<ExecutionTaskCompletionNotification, ExecutionAdapterError>) + Send>,
) -> Result<(), ExecutionOperationError>
fn execute( &self, transaction_pair: TransactionPair, context_id: ContextId, on_done: Box<dyn Fn(Result<ExecutionTaskCompletionNotification, ExecutionAdapterError>) + Send>, ) -> Result<(), ExecutionOperationError>
Execute the transaction and provide an callback that handles the result. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for StaticExecutionAdapter
impl !UnwindSafe for StaticExecutionAdapter
impl Freeze for StaticExecutionAdapter
impl Send for StaticExecutionAdapter
impl Sync for StaticExecutionAdapter
impl Unpin for StaticExecutionAdapter
impl UnsafeUnpin for StaticExecutionAdapter
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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> IntoSql for T
impl<T> IntoSql for T
Source§fn into_sql<T>(self) -> Self::Expressionwhere
Self: Sized + AsExpression<T>,
fn into_sql<T>(self) -> Self::Expressionwhere
Self: Sized + AsExpression<T>,
Convert
self to an expression for Diesel’s query builder. Read moreSource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expressionwhere
&'a Self: AsExpression<T>,
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expressionwhere
&'a Self: AsExpression<T>,
Convert
&self to an expression for Diesel’s query builder. Read more