handle_events

Function handle_events 

Source
pub async fn handle_events(
    events: Receiver<TransferEvent>,
    cancel: CancellationToken,
) -> Option<TransferStats>
Available on crate feature cli only.
Expand description

Handles events that may occur during a copy operation.

This is responsible for showing and updating progress bars for files being transferred.

Used from CLI implementations.

Returns None if the event stream lagged and reliable statistics aren’t available.

Returns Some if the event stream did not lag and reliable statistics are available.