[−][src]Struct transact::execution::adapter::static_adapter::StaticExecutionAdapter
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.
Methods
impl StaticExecutionAdapter
[src]
pub fn new_adapter(
handlers: Vec<Box<dyn TransactionHandler>>,
context_manager: ContextManager
) -> Result<Self, ExecutionAdapterError>
[src]
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
impl ExecutionAdapter for StaticExecutionAdapter
[src]
fn start(
&mut self,
execution_registry: Box<dyn ExecutionRegistry>
) -> Result<(), ExecutionOperationError>
[src]
&mut self,
execution_registry: Box<dyn ExecutionRegistry>
) -> Result<(), ExecutionOperationError>
fn execute(
&self,
transaction_pair: TransactionPair,
context_id: ContextId,
on_done: Box<dyn Fn(Result<ExecutionTaskCompletionNotification, ExecutionAdapterError>) + Send>
) -> Result<(), ExecutionOperationError>
[src]
&self,
transaction_pair: TransactionPair,
context_id: ContextId,
on_done: Box<dyn Fn(Result<ExecutionTaskCompletionNotification, ExecutionAdapterError>) + Send>
) -> Result<(), ExecutionOperationError>
fn stop(self: Box<Self>) -> Result<(), ExecutionOperationError>
[src]
Auto Trait Implementations
impl Send for StaticExecutionAdapter
impl !Sync for StaticExecutionAdapter
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> SafeBorrow<T> for T where
T: ?Sized,
T: ?Sized,
fn borrow_replacement(ptr: &T) -> &T
impl<T> Same<T> for T
type Output = T
Should always be Self