pub fn remove_txhandler_from_map<T: State>(
txhandlers: &mut BTreeMap<TransactionType, TxHandler<T>>,
tx_type: TransactionType,
) -> Result<TxHandler<T>, BridgeError>
Expand description
Removes a TxHandler
from a map by transaction type, returning an error if not found.
§Arguments
txhandlers
- The map of transaction handlers.tx_type
- The transaction type to remove.
§Returns
The removed TxHandler
, or a BridgeError
if not found.