[−][src]Struct transact::sawtooth::SawtoothToTransactHandlerAdapter
Adapts a Sawtooth Transaction Handler to a Transact TransactionHandler.
This adapter allows Sawtooth SDK TransactionHandler implementations to be used with the Transact static execution adapters. Existing Sawtooth transaction families and smart contract engines can then be compiled in to an application using Transact.
For example, the Sawtooth transaction handler for the XO Transaction Family can be adapted as follows:
let execution_adapter = StaticExecutionAdapter::new_adapter( vec![Box::new(SawtoothToTransactHandlerAdapter::new( XoTransactionHandler::new(), ))], context_manager, );
Methods
impl<H: SawtoothTransactionHandler + Send> SawtoothToTransactHandlerAdapter<H>
[src]
Trait Implementations
impl<H: SawtoothTransactionHandler + Send> TransactionHandler for SawtoothToTransactHandlerAdapter<H>
[src]
fn family_name(&self) -> &str
[src]
fn family_versions(&self) -> &[String]
[src]
fn apply(
&self,
transaction_pair: &TransactionPair,
context: &mut dyn TransactionContext
) -> Result<(), ApplyError>
[src]
&self,
transaction_pair: &TransactionPair,
context: &mut dyn TransactionContext
) -> Result<(), ApplyError>
Auto Trait Implementations
impl<H> RefUnwindSafe for SawtoothToTransactHandlerAdapter<H> where
H: RefUnwindSafe,
H: RefUnwindSafe,
impl<H> Send for SawtoothToTransactHandlerAdapter<H>
impl<H> Sync for SawtoothToTransactHandlerAdapter<H> where
H: Sync,
H: Sync,
impl<H> Unpin for SawtoothToTransactHandlerAdapter<H> where
H: Unpin,
H: Unpin,
impl<H> UnwindSafe for SawtoothToTransactHandlerAdapter<H> where
H: UnwindSafe,
H: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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
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>,