pub struct HookContext {
pub task: Option<SyncTask>,
pub report: Option<SyncReport>,
pub file: Option<FileMetadata>,
pub error: Option<SyncError>,
pub custom_data: HashMap<String, Value>,
}Fields§
§task: Option<SyncTask>§report: Option<SyncReport>§file: Option<FileMetadata>§error: Option<SyncError>§custom_data: HashMap<String, Value>Implementations§
Source§impl HookContext
impl HookContext
pub fn new() -> Self
pub fn with_task(self, task: SyncTask) -> Self
pub fn with_report(self, report: SyncReport) -> Self
pub fn with_file(self, file: FileMetadata) -> Self
pub fn with_error(self, error: SyncError) -> Self
pub fn set_custom_data(&mut self, key: String, value: Value)
pub fn get_custom_data(&self, key: &str) -> Option<&Value>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HookContext
impl !RefUnwindSafe for HookContext
impl Send for HookContext
impl Sync for HookContext
impl Unpin for HookContext
impl !UnwindSafe for HookContext
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more