pub trait HookHandler: Send + Sync {
// Required methods
fn on_before_sync<'life0, 'life1, 'async_trait>(
&'life0 self,
task: &'life1 SyncTask,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn on_after_sync<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
task: &'life1 SyncTask,
report: &'life2 SyncReport,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn on_file_uploading<'life0, 'life1, 'async_trait>(
&'life0 self,
file: &'life1 FileMetadata,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn on_file_uploaded<'life0, 'life1, 'async_trait>(
&'life0 self,
file: &'life1 FileMetadata,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn on_error<'life0, 'life1, 'async_trait>(
&'life0 self,
error: &'life1 SyncError,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
钩子处理器 trait