Skip to main content

Reporter

Trait Reporter 

Source
pub trait Reporter {
    // Required method
    fn report(&mut self, event: OutputEvent) -> Result<()>;

    // Provided methods
    fn file_operation_planning_started(
        &mut self,
        operation: FileOperationKind,
        source: &Path,
        target: &Path,
    ) -> Result<()> { ... }
    fn file_operation_planning_finished(
        &mut self,
        operation: FileOperationKind,
        source: &Path,
        target: &Path,
        action_count: usize,
    ) -> Result<()> { ... }
    fn file_operation_execution_started(
        &mut self,
        operation: FileOperationKind,
        source: &Path,
        target: &Path,
        action_count: usize,
    ) -> Result<()> { ... }
    fn file_operation_action_advanced(
        &mut self,
        operation: FileOperationKind,
        source: &Path,
        target: &Path,
    ) -> Result<()> { ... }
    fn file_operation_finished(
        &mut self,
        operation: FileOperationKind,
        source: &Path,
        target: &Path,
        summary: &FileOperationSummary,
        dry_run: bool,
    ) -> Result<()> { ... }
}
Expand description

Receives structured output events from core operations.

Required Methods§

Source

fn report(&mut self, event: OutputEvent) -> Result<()>

Handles one output event.

Provided Methods§

Source

fn file_operation_planning_started( &mut self, operation: FileOperationKind, source: &Path, target: &Path, ) -> Result<()>

Handles the start of planning for one top-level file operation.

Source

fn file_operation_planning_finished( &mut self, operation: FileOperationKind, source: &Path, target: &Path, action_count: usize, ) -> Result<()>

Handles completion of planning for one top-level file operation.

Source

fn file_operation_execution_started( &mut self, operation: FileOperationKind, source: &Path, target: &Path, action_count: usize, ) -> Result<()>

Handles the start of execution for one top-level file operation.

Source

fn file_operation_action_advanced( &mut self, operation: FileOperationKind, source: &Path, target: &Path, ) -> Result<()>

Handles completion of one concrete file-operation action.

Source

fn file_operation_finished( &mut self, operation: FileOperationKind, source: &Path, target: &Path, summary: &FileOperationSummary, dry_run: bool, ) -> Result<()>

Handles completion of one top-level compact file operation.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§