Skip to main content

SyncProgress

Trait SyncProgress 

Source
pub trait SyncProgress: Send + Sync {
    // Required methods
    fn on_start(
        &self,
        repo: &OwnedRepo,
        path: &Path,
        index: usize,
        total: usize,
    );
    fn on_fetch_complete(
        &self,
        repo: &OwnedRepo,
        result: &FetchResult,
        index: usize,
        total: usize,
    );
    fn on_pull_complete(
        &self,
        repo: &OwnedRepo,
        result: &PullResult,
        index: usize,
        total: usize,
    );
    fn on_error(
        &self,
        repo: &OwnedRepo,
        error: &str,
        index: usize,
        total: usize,
    );
    fn on_skip(
        &self,
        repo: &OwnedRepo,
        reason: &str,
        index: usize,
        total: usize,
    );
}
Expand description

Progress callback for sync operations.

Required Methods§

Source

fn on_start(&self, repo: &OwnedRepo, path: &Path, index: usize, total: usize)

Called when a sync operation starts.

Source

fn on_fetch_complete( &self, repo: &OwnedRepo, result: &FetchResult, index: usize, total: usize, )

Called when a fetch completes.

Source

fn on_pull_complete( &self, repo: &OwnedRepo, result: &PullResult, index: usize, total: usize, )

Called when a pull completes.

Source

fn on_error(&self, repo: &OwnedRepo, error: &str, index: usize, total: usize)

Called when a sync fails.

Source

fn on_skip(&self, repo: &OwnedRepo, reason: &str, index: usize, total: usize)

Called when a sync is skipped.

Implementors§