[−][src]Trait transact::handler::TransactionHandler
Required methods
fn family_name(&self) -> &str
TransactionHandler that defines the business logic for a new transaction family. The family_name, family_versions, and namespaces functions are used by the processor to route processing requests to the handler. family_name should return the name of the transaction family that this handler can process, e.g. "intkey"
fn family_versions(&self) -> &[String]
family_versions should return a list of versions this transaction family handler can process, e.g. ["1.0"]
fn apply(
&self,
transaction: &TransactionPair,
context: &mut dyn TransactionContext
) -> Result<(), ApplyError>
&self,
transaction: &TransactionPair,
context: &mut dyn TransactionContext
) -> Result<(), ApplyError>
Apply is the single method where all the business logic for a transaction family is defined. The method will be called by the transaction processor upon receiving a TpProcessRequest that the handler understands and will pass in the TpProcessRequest and an initialized instance of the Context type.
Implementors
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>