Skip to main content

HostingClient

Trait HostingClient 

Source
pub trait HostingClient: Send + Sync {
Show 60 methods // Required methods fn integration(&self) -> &Integration; fn list_projects<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<HostedProject>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn list_ssh_keys<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<HostedSshKey>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn upload_ssh_key<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, title: &'life1 str, public_key: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<HostedSshKey>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn create_pull_request<'life0, 'life1, 'async_trait>( &'life0 self, req: &'life1 NewPullRequest, ) -> Pin<Box<dyn Future<Output = Result<CreatedPullRequest>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; // Provided methods fn unsupported(&self, what: &str) -> Error { ... } fn current_user<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<HostedUser>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn protected_branches<'life0, 'life1, 'async_trait>( &'life0 self, _project: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<ProtectedBranches>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn check_token<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<TokenCheck>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn list_pull_requests<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _project: &'life1 str, _filter: &'life2 PrFilter, ) -> Pin<Box<dyn Future<Output = Result<Vec<PullRequestSummary>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait { ... } fn pull_request_for_branch<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _project: &'life1 str, _branch: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Option<PullRequestSummary>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait { ... } fn list_issues<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _project: &'life1 str, _filter: &'life2 IssueFilter, ) -> Pin<Box<dyn Future<Output = Result<Vec<IssueSummary>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait { ... } fn create_issue<'life0, 'life1, 'async_trait>( &'life0 self, _req: &'life1 NewIssue, ) -> Pin<Box<dyn Future<Output = Result<CreatedIssue>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn issue_create_options<'life0, 'life1, 'async_trait>( &'life0 self, _project: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<IssueCreateOptions>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn delete_ssh_key<'life0, 'life1, 'async_trait>( &'life0 self, _id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn review_capabilities(&self) -> ReviewCapabilities { ... } fn pull_request_detail<'life0, 'life1, 'async_trait>( &'life0 self, _project: &'life1 str, _number: u64, ) -> Pin<Box<dyn Future<Output = Result<PullRequestDetail>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn pull_request_detail_at<'life0, 'life1, 'async_trait>( &'life0 self, project: &'life1 str, number: u64, _patch_set: Option<u32>, ) -> Pin<Box<dyn Future<Output = Result<PullRequestDetail>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn pull_request_files_at<'life0, 'life1, 'async_trait>( &'life0 self, project: &'life1 str, number: u64, _patch_set: Option<u32>, ) -> Pin<Box<dyn Future<Output = Result<Vec<ReviewFile>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn pull_request_files_against<'life0, 'life1, 'async_trait>( &'life0 self, project: &'life1 str, number: u64, patch_set: Option<u32>, _base_patch_set: Option<u32>, ) -> Pin<Box<dyn Future<Output = Result<Vec<ReviewFile>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn submit_change<'life0, 'life1, 'async_trait>( &'life0 self, _project: &'life1 str, _number: u64, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn abandon_change<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _project: &'life1 str, _number: u64, _message: Option<&'life2 str>, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait { ... } fn pull_request_threads_at<'life0, 'life1, 'async_trait>( &'life0 self, project: &'life1 str, number: u64, _patch_set: Option<u32>, ) -> Pin<Box<dyn Future<Output = Result<Vec<ReviewThread>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn pull_request_files<'life0, 'life1, 'async_trait>( &'life0 self, _project: &'life1 str, _number: u64, ) -> Pin<Box<dyn Future<Output = Result<Vec<ReviewFile>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn pull_request_threads<'life0, 'life1, 'async_trait>( &'life0 self, _project: &'life1 str, _number: u64, ) -> Pin<Box<dyn Future<Output = Result<Vec<ReviewThread>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn pull_request_conversation<'life0, 'life1, 'async_trait>( &'life0 self, _project: &'life1 str, _number: u64, ) -> Pin<Box<dyn Future<Output = Result<Vec<ReviewComment>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn pull_request_reviews<'life0, 'life1, 'async_trait>( &'life0 self, _project: &'life1 str, _number: u64, ) -> Pin<Box<dyn Future<Output = Result<Vec<SubmittedReview>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn add_comment<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _project: &'life1 str, _number: u64, _body: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<ReviewComment>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait { ... } fn reply_to_thread<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, _project: &'life1 str, _number: u64, _thread_id: &'life2 str, _body: &'life3 str, ) -> Pin<Box<dyn Future<Output = Result<ReviewComment>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait { ... } fn resolve_thread<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _project: &'life1 str, _number: u64, _thread_id: &'life2 str, _resolved: bool, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait { ... } fn submit_review<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _project: &'life1 str, _number: u64, _review: &'life2 ReviewSubmission, ) -> Pin<Box<dyn Future<Output = Result<ReviewOutcome>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait { ... } fn conversation_caps(&self, _kind: ItemKind) -> ConversationCaps { ... } fn posting_identity<'life0, 'life1, 'async_trait>( &'life0 self, _project: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<PostingIdentity>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn item_timeline<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, _project: &'life1 str, _key: &'life2 ItemKey, _older: Option<&'life3 PageCursor>, _opts: &'life4 TimelineOpts, ) -> Pin<Box<dyn Future<Output = Result<TimelinePage>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait { ... } fn post_item_comment<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, _project: &'life1 str, _key: &'life2 ItemKey, _body: &'life3 str, _internal: bool, ) -> Pin<Box<dyn Future<Output = Result<Comment>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait { ... } fn reply_in_discussion<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, _project: &'life1 str, _key: &'life2 ItemKey, _discussion_id: &'life3 str, _body: &'life4 str, ) -> Pin<Box<dyn Future<Output = Result<Comment>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait { ... } fn edit_item_comment<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, _project: &'life1 str, _key: &'life2 ItemKey, _comment_id: &'life3 str, _body: &'life4 str, ) -> Pin<Box<dyn Future<Output = Result<Comment>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait { ... } fn delete_item_comment<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, _project: &'life1 str, _key: &'life2 ItemKey, _comment_id: &'life3 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait { ... } fn create_issue_branch<'life0, 'life1, 'async_trait>( &'life0 self, _req: &'life1 NewIssueBranch, ) -> Pin<Box<dyn Future<Output = Result<CreatedBranch>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn issue_links<'life0, 'life1, 'async_trait>( &'life0 self, _project: &'life1 str, _number: u64, ) -> Pin<Box<dyn Future<Output = Result<IssueLinks>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn branch_names<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _project: &'life1 str, _search: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<String>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait { ... } fn project_members<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _project: &'life1 str, _query: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<HostedUser>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait { ... } fn project_labels<'life0, 'life1, 'async_trait>( &'life0 self, _project: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<HostedLabel>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn project_milestones<'life0, 'life1, 'async_trait>( &'life0 self, _project: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<HostedMilestone>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn item_meta<'life0, 'life1, 'async_trait>( &'life0 self, _project: &'life1 str, _number: u64, _kind: MetaKind, ) -> Pin<Box<dyn Future<Output = Result<ItemMeta>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn update_issue<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _project: &'life1 str, _number: u64, _edit: &'life2 IssueEdit, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait { ... } fn issue_statuses<'life0, 'life1, 'async_trait>( &'life0 self, _project: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<String>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn set_issue_status<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _project: &'life1 str, _number: u64, _status: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait { ... } fn set_issue_state<'life0, 'life1, 'async_trait>( &'life0 self, _project: &'life1 str, _number: u64, _closed: bool, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn board_source(&self) -> BoardSource { ... } fn move_issue<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, project: &'life1 str, issue: &'life2 IssueSummary, spec: &'life3 BoardSpec, to: &'life4 BoardColumn, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait { ... } fn merge_pull_request<'life0, 'life1, 'async_trait>( &'life0 self, _project: &'life1 str, _number: u64, _method: MergeMethod, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn mark_pull_request_ready<'life0, 'life1, 'async_trait>( &'life0 self, _project: &'life1 str, _number: u64, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn close_pull_request<'life0, 'life1, 'async_trait>( &'life0 self, _project: &'life1 str, _number: u64, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn update_pull_request<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _project: &'life1 str, _number: u64, _edit: &'life2 PrEdit, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait { ... } fn pull_request_diff<'life0, 'life1, 'async_trait>( &'life0 self, _project: &'life1 str, _number: u64, _patch_set: Option<u32>, _compare: Option<u32>, ) -> Pin<Box<dyn Future<Output = Result<Vec<ApiFileDiff>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn pull_request_commits<'life0, 'life1, 'async_trait>( &'life0 self, _project: &'life1 str, _number: u64, ) -> Pin<Box<dyn Future<Output = Result<Vec<ApiCommit>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn commit_diff<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _project: &'life1 str, _sha: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<ApiFileDiff>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait { ... } fn file_content<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, _project: &'life1 str, _path: &'life2 str, _rev: Option<&'life3 str>, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait { ... } fn account_items<'life0, 'life1, 'async_trait>( &'life0 self, _query: &'life1 AccountQuery, ) -> Pin<Box<dyn Future<Output = Result<AccountItems>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... }
}

Required Methods§

Source

fn integration(&self) -> &Integration

Source

fn list_projects<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<HostedProject>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Every project the token can see, newest-activity first where the host offers that ordering.

Source

fn list_ssh_keys<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<HostedSshKey>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

The SSH public keys already on the account, so an upload a key flow can say “you already have this one” instead of creating a duplicate the user then has to find and delete.

Source

fn upload_ssh_key<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, title: &'life1 str, public_key: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<HostedSshKey>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Adds public_key (an ssh-ed25519 AAAA... comment line) to the account under title.

Source

fn create_pull_request<'life0, 'life1, 'async_trait>( &'life0 self, req: &'life1 NewPullRequest, ) -> Pin<Box<dyn Future<Output = Result<CreatedPullRequest>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Opens a pull request (GitHub) or merge request (GitLab) from req.source_branch into req.target_branch.

Provided Methods§

Source

fn unsupported(&self, what: &str) -> Error

The error for an operation this client does not offer. The optional operations below return it by default, so one override changes the answer for all of them.

Source

fn current_user<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<HostedUser>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

The account the token belongs to.

Source

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

The branches of project the host protects (names and * patterns), for a history rewrite that must not force-push them blindly. What the token cannot read is an error here; the caller (crate::protection::lookup) turns it into “unknown”.

Source

fn check_token<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<TokenCheck>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Validates the token and reports its user, scopes and expiry.

Source

fn list_pull_requests<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _project: &'life1 str, _filter: &'life2 PrFilter, ) -> Pin<Box<dyn Future<Output = Result<Vec<PullRequestSummary>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Pull/merge requests of project (owner/name, group/sub/proj).

Source

fn pull_request_for_branch<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _project: &'life1 str, _branch: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Option<PullRequestSummary>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

The request that best represents branch: open, then draft, then merged, then closed; newest first among equals.

Source

fn list_issues<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _project: &'life1 str, _filter: &'life2 IssueFilter, ) -> Pin<Box<dyn Future<Output = Result<Vec<IssueSummary>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

fn create_issue<'life0, 'life1, 'async_trait>( &'life0 self, _req: &'life1 NewIssue, ) -> Pin<Box<dyn Future<Output = Result<CreatedIssue>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Opens an issue on req.project.

Source

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

The types / lists the New-issue form offers for project. Empty by default (GitHub and GitLab have neither).

Source

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

Removes the account SSH key with the host’s own id.

Source

fn review_capabilities(&self) -> ReviewCapabilities

What a review on this host may do, so a UI hides the rest instead of offering a choice that fails (GitLab has no “request changes”). All-false by default.

Source

fn pull_request_detail<'life0, 'life1, 'async_trait>( &'life0 self, _project: &'life1 str, _number: u64, ) -> Pin<Box<dyn Future<Output = Result<PullRequestDetail>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

One request, read for review: description, head and base commits, merge state, checks.

Source

fn pull_request_detail_at<'life0, 'life1, 'async_trait>( &'life0 self, project: &'life1 str, number: u64, _patch_set: Option<u32>, ) -> Pin<Box<dyn Future<Output = Result<PullRequestDetail>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Self::pull_request_detail at patch set patch_set (None: the newest). Only Gerrit has patch sets; the others ignore it.

Source

fn pull_request_files_at<'life0, 'life1, 'async_trait>( &'life0 self, project: &'life1 str, number: u64, _patch_set: Option<u32>, ) -> Pin<Box<dyn Future<Output = Result<Vec<ReviewFile>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Self::pull_request_files at a patch set.

Source

fn pull_request_files_against<'life0, 'life1, 'async_trait>( &'life0 self, project: &'life1 str, number: u64, patch_set: Option<u32>, _base_patch_set: Option<u32>, ) -> Pin<Box<dyn Future<Output = Result<Vec<ReviewFile>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Self::pull_request_files_at as the difference from patch set base instead of from the target branch (Gerrit’s “compare with”; the others have no patch sets and ignore it).

Source

fn submit_change<'life0, 'life1, 'async_trait>( &'life0 self, _project: &'life1 str, _number: u64, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Submits (merges) a change on the host (Gerrit; PullRequestDetail:: can_submit says when the server allows it). Outward, not undoable.

Source

fn abandon_change<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _project: &'life1 str, _number: u64, _message: Option<&'life2 str>, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Abandons a change, with an optional message to the owner and reviewers (Gerrit). Outward, not undoable from GitPoulpi.

Source

fn pull_request_threads_at<'life0, 'life1, 'async_trait>( &'life0 self, project: &'life1 str, number: u64, _patch_set: Option<u32>, ) -> Pin<Box<dyn Future<Output = Result<Vec<ReviewThread>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Self::pull_request_threads judged against a patch set: threads written on another one are outdated.

Source

fn pull_request_files<'life0, 'life1, 'async_trait>( &'life0 self, _project: &'life1 str, _number: u64, ) -> Pin<Box<dyn Future<Output = Result<Vec<ReviewFile>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

The files the request changes, for the file list.

Source

fn pull_request_threads<'life0, 'life1, 'async_trait>( &'life0 self, _project: &'life1 str, _number: u64, ) -> Pin<Box<dyn Future<Output = Result<Vec<ReviewThread>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

The code threads of the request, resolved ones included.

Source

fn pull_request_conversation<'life0, 'life1, 'async_trait>( &'life0 self, _project: &'life1 str, _number: u64, ) -> Pin<Box<dyn Future<Output = Result<Vec<ReviewComment>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

The comments that are not on code, oldest first.

Source

fn pull_request_reviews<'life0, 'life1, 'async_trait>( &'life0 self, _project: &'life1 str, _number: u64, ) -> Pin<Box<dyn Future<Output = Result<Vec<SubmittedReview>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

The reviews already submitted (verdict and summary), oldest first. Empty drafts are not listed.

Source

fn add_comment<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _project: &'life1 str, _number: u64, _body: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<ReviewComment>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Posts a conversation comment (not on code), immediately.

Source

fn reply_to_thread<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, _project: &'life1 str, _number: u64, _thread_id: &'life2 str, _body: &'life3 str, ) -> Pin<Box<dyn Future<Output = Result<ReviewComment>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Answers a thread (ReviewThread::id), immediately.

Source

fn resolve_thread<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _project: &'life1 str, _number: u64, _thread_id: &'life2 str, _resolved: bool, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Resolves (true) or reopens (false) a thread.

Source

fn submit_review<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _project: &'life1 str, _number: u64, _review: &'life2 ReviewSubmission, ) -> Pin<Box<dyn Future<Output = Result<ReviewOutcome>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Submits a review: the collected line comments and the verdict in one go. Unsupported for an event Self::review_capabilities does not offer.

Source

fn conversation_caps(&self, _kind: ItemKind) -> ConversationCaps

What the conversation of an issue or request may do on this host. ConversationCaps::NONE by default: no conversation at all.

Source

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

Who a post to project is made as: always known (see crate::conversation::identity). Hits the network at most once.

Source

fn item_timeline<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, _project: &'life1 str, _key: &'life2 ItemKey, _older: Option<&'life3 PageCursor>, _opts: &'life4 TimelineOpts, ) -> Pin<Box<dyn Future<Output = Result<TimelinePage>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

The item’s header and the newest window (at most crate::conversation::WINDOW entries) of its conversation, or the window before older.

Source

fn post_item_comment<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, _project: &'life1 str, _key: &'life2 ItemKey, _body: &'life3 str, _internal: bool, ) -> Pin<Box<dyn Future<Output = Result<Comment>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Posts a comment on the item, immediately. Outward, not undoable. internal: only members see it (GitLab).

Source

fn reply_in_discussion<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, _project: &'life1 str, _key: &'life2 ItemKey, _discussion_id: &'life3 str, _body: &'life4 str, ) -> Pin<Box<dyn Future<Output = Result<Comment>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

Answers a discussion (a code thread, or a GitLab discussion).

Source

fn edit_item_comment<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, _project: &'life1 str, _key: &'life2 ItemKey, _comment_id: &'life3 str, _body: &'life4 str, ) -> Pin<Box<dyn Future<Output = Result<Comment>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

Edits one of our own comments.

Source

fn delete_item_comment<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, _project: &'life1 str, _key: &'life2 ItemKey, _comment_id: &'life3 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Deletes one of our own comments.

Source

fn create_issue_branch<'life0, 'life1, 'async_trait>( &'life0 self, _req: &'life1 NewIssueBranch, ) -> Pin<Box<dyn Future<Output = Result<CreatedBranch>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Creates a branch on the host for an issue (GitLab: the branches API, GitHub: createLinkedBranch, Gitea / Forgejo: the branches API). Outward, not undoable from GitPoulpi.

The branches and requests the host links to issue number itself.

Source

fn branch_names<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _project: &'life1 str, _search: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<String>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Branch names of project that start with (GitHub) or contain (GitLab, Gitea) search; the caller filters them exactly.

Source

fn project_members<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _project: &'life1 str, _query: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<HostedUser>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

The people who can be assigned to or asked to review in project, narrowed by query (empty: everyone, paged).

Source

fn project_labels<'life0, 'life1, 'async_trait>( &'life0 self, _project: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<HostedLabel>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

The labels of project.

Source

fn project_milestones<'life0, 'life1, 'async_trait>( &'life0 self, _project: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<HostedMilestone>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

The open milestones of project.

Source

fn item_meta<'life0, 'life1, 'async_trait>( &'life0 self, _project: &'life1 str, _number: u64, _kind: MetaKind, ) -> Pin<Box<dyn Future<Output = Result<ItemMeta>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

What issue / request number carries now (the picker’s checked rows).

Source

fn update_issue<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _project: &'life1 str, _number: u64, _edit: &'life2 IssueEdit, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Replaces the assignees / labels / milestone of an issue.

Source

fn issue_statuses<'life0, 'life1, 'async_trait>( &'life0 self, _project: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<String>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

The statuses an issue can be in, board order (the local Markdown source; the Kanban slice reads it too). Empty by default.

Source

fn set_issue_status<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _project: &'life1 str, _number: u64, _status: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Moves an issue to status (local Markdown).

Source

fn set_issue_state<'life0, 'life1, 'async_trait>( &'life0 self, _project: &'life1 str, _number: u64, _closed: bool, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Closes (true) or reopens (false) an issue (local Markdown: the configured done status, or the first other one; GitHub, GitLab, Gitea: the issue’s state).

Source

fn board_source(&self) -> BoardSource

How this source forms the board’s columns (crate::board). Open / Closed by default; a provider with a workflow overrides it and, for the status-like sources, issue_statuses.

Source

fn move_issue<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, project: &'life1 str, issue: &'life2 IssueSummary, spec: &'life3 BoardSpec, to: &'life4 BoardColumn, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

Moves issue to column to of the board spec. The default runs the crate::board::plan_move plan through set_issue_status, update_issue and set_issue_state, so a client gets a move by implementing those (Unsupported otherwise: a read-only board).

Source

fn merge_pull_request<'life0, 'life1, 'async_trait>( &'life0 self, _project: &'life1 str, _number: u64, _method: MergeMethod, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Merges a pull / merge request on the host (GitHub, GitLab, Gitea, Forgejo). Not undoable from here: the host owns the result.

Source

fn mark_pull_request_ready<'life0, 'life1, 'async_trait>( &'life0 self, _project: &'life1 str, _number: u64, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Takes a draft pull / merge request out of draft.

Source

fn close_pull_request<'life0, 'life1, 'async_trait>( &'life0 self, _project: &'life1 str, _number: u64, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Closes a pull / merge request without merging it.

Source

fn update_pull_request<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _project: &'life1 str, _number: u64, _edit: &'life2 PrEdit, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Replaces the assignees / reviewers / labels / milestone of a pull / merge request.

Source

fn pull_request_diff<'life0, 'life1, 'async_trait>( &'life0 self, _project: &'life1 str, _number: u64, _patch_set: Option<u32>, _compare: Option<u32>, ) -> Pin<Box<dyn Future<Output = Result<Vec<ApiFileDiff>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

The diff of a request, file by file, with hunks, read from the host. patch_set and compare are Gerrit’s; the others ignore them. A file whose patch the host left out carries omitted.

Source

fn pull_request_commits<'life0, 'life1, 'async_trait>( &'life0 self, _project: &'life1 str, _number: u64, ) -> Pin<Box<dyn Future<Output = Result<Vec<ApiCommit>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

The commits of a request, oldest first.

Source

fn commit_diff<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _project: &'life1 str, _sha: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<ApiFileDiff>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

What one commit changed (against its first parent), read from the host.

Source

fn file_content<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, _project: &'life1 str, _path: &'life2 str, _rev: Option<&'life3 str>, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

The bytes of path at rev (a branch, tag or commit; None: the project’s default branch). Ok(None) when the file does not exist there.

Source

fn account_items<'life0, 'life1, 'async_trait>( &'life0 self, _query: &'life1 AccountQuery, ) -> Pin<Box<dyn Future<Output = Result<AccountItems>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

The account-wide lists query asks for (requests waiting for my review, every open request of my namespaces, issues assigned to me), across every repository rather than one project. Every code host but Bitbucket Cloud answers; the others say Unsupported.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§