Skip to main content

ProgressCallback

Trait ProgressCallback 

Source
pub trait ProgressCallback: Send + Sync {
    // Required methods
    fn on_phase<'life0, 'async_trait>(
        &'life0 self,
        phase: Phase,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn on_bookmark_push<'life0, 'life1, 'async_trait>(
        &'life0 self,
        bookmark: &'life1 str,
        status: PushStatus,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn on_pr_created<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        bookmark: &'life1 str,
        pr: &'life2 PullRequest,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn on_pr_updated<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        bookmark: &'life1 str,
        pr: &'life2 PullRequest,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn on_error<'life0, 'life1, 'async_trait>(
        &'life0 self,
        error: &'life1 Error,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn on_message<'life0, 'life1, 'async_trait>(
        &'life0 self,
        message: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Progress callback trait

Implement this trait to receive progress updates during submission.

  • CLI implementations can print to terminal
  • Web servers can send SSE or WebSocket messages

Required Methods§

Source

fn on_phase<'life0, 'async_trait>( &'life0 self, phase: Phase, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Called when entering a new phase

Source

fn on_bookmark_push<'life0, 'life1, 'async_trait>( &'life0 self, bookmark: &'life1 str, status: PushStatus, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Called when a bookmark is being pushed

Source

fn on_pr_created<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, bookmark: &'life1 str, pr: &'life2 PullRequest, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Called when a PR is created

Source

fn on_pr_updated<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, bookmark: &'life1 str, pr: &'life2 PullRequest, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Called when a PR is updated

Source

fn on_error<'life0, 'life1, 'async_trait>( &'life0 self, error: &'life1 Error, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Called when an error occurs (non-fatal)

Source

fn on_message<'life0, 'life1, 'async_trait>( &'life0 self, message: &'life1 str, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Called with a general status message

Implementors§