Trait cfdp::UserFaultHookProvider
source · pub trait UserFaultHookProvider {
// Required methods
fn notice_of_suspension_cb(
&mut self,
transaction_id: TransactionId,
cond: ConditionCode,
progress: u64,
);
fn notice_of_cancellation_cb(
&mut self,
transaction_id: TransactionId,
cond: ConditionCode,
progress: u64,
);
fn abandoned_cb(
&mut self,
transaction_id: TransactionId,
cond: ConditionCode,
progress: u64,
);
fn ignore_cb(
&mut self,
transaction_id: TransactionId,
cond: ConditionCode,
progress: u64,
);
}Expand description
This trait introduces some callbacks which will be called when a particular CFDP fault handler is called.
It is passed into the CFDP handlers as part of the UserFaultHookProvider and the local entity configuration and provides a way to specify custom user error handlers. This allows to implement some CFDP features like fault handler logging, which would not be possible generically otherwise.
For each error reported by the FaultHandler, the appropriate fault handler callback will be called depending on the FaultHandlerCode.