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§
Sourcefn 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_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
Sourcefn 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_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
Sourcefn 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_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
Sourcefn 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_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