pub struct GitHubForge { /* private fields */ }Implementations§
Source§impl GitHubForge
impl GitHubForge
pub fn new() -> Result<Self>
pub fn with_base_url(base_url: &str) -> Result<Self>
pub fn with_token(base_url: &str, token: String) -> Result<Self>
Sourcepub fn with_token_insecure(base_url: &str, token: String) -> Result<Self>
pub fn with_token_insecure(base_url: &str, token: String) -> Result<Self>
Like [with_token] but allows the caller to opt into insecure hosts
(non-https, loopback/private IP literals). Production callers should
stick with [with_token].
Sourcepub fn with_warn_handler(self, handler: ForgeWarnHandler) -> Self
pub fn with_warn_handler(self, handler: ForgeWarnHandler) -> Self
Install a callback to receive non-fatal warnings (e.g. pagination
truncation). Without one, warnings fall back to eprintln!.
Trait Implementations§
Source§impl ForgeComments for GitHubForge
impl ForgeComments for GitHubForge
fn get_comments<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 PrId,
) -> Pin<Box<dyn Future<Output = Result<Vec<RemoteComment>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_review_threads<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 PrId,
) -> Pin<Box<dyn Future<Output = Result<Vec<ReviewThread>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn post_comment<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 PrId,
comment: NewComment,
) -> Pin<Box<dyn Future<Output = Result<RemoteComment>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn post_reply<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
id: &'life1 PrId,
thread_id: &'life2 str,
body: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<RemoteComment>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn edit_comment<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 PrId,
comment_id: u64,
body: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<RemoteComment>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn delete_comment<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 PrId,
comment_id: u64,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn resolve_thread<'life0, 'life1, 'async_trait>(
&'life0 self,
thread_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn unresolve_thread<'life0, 'life1, 'async_trait>(
&'life0 self,
thread_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§impl ForgeMerge for GitHubForge
impl ForgeMerge for GitHubForge
fn merge<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 PrId,
method: MergeMethod,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn close<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 PrId,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn reopen<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 PrId,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§impl ForgeReactions for GitHubForge
impl ForgeReactions for GitHubForge
fn add_reaction<'life0, 'life1, 'async_trait>(
&'life0 self,
target: &'life1 ReactionTarget,
content: ReactionContent,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn remove_reaction<'life0, 'life1, 'async_trait>(
&'life0 self,
target: &'life1 ReactionTarget,
content: ReactionContent,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§impl ForgeRead for GitHubForge
impl ForgeRead for GitHubForge
fn forge_type(&self) -> ForgeType
fn get_pr<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 PrId,
) -> Pin<Box<dyn Future<Output = Result<PrMetadata>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_pr_commits<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 PrId,
) -> Pin<Box<dyn Future<Output = Result<Vec<CommitInfo>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn list_prs<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
owner: &'life1 str,
repo: &'life2 str,
filter: &'life3 PrListFilter,
) -> Pin<Box<dyn Future<Output = Result<Vec<PrListItem>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn list_prs<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
owner: &'life1 str,
repo: &'life2 str,
filter: &'life3 PrListFilter,
) -> Pin<Box<dyn Future<Output = Result<Vec<PrListItem>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
List open PRs/MRs on a repository matching the given filter. Read more
fn get_pr_files<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 PrId,
) -> Pin<Box<dyn Future<Output = Result<Vec<DiffFile>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_commit_diff<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 PrId,
commit_sha: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<DiffFile>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn current_user<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<User>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn check_permissions<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 PrId,
) -> Pin<Box<dyn Future<Output = Result<Permissions>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§impl ForgeReview for GitHubForge
impl ForgeReview for GitHubForge
Auto Trait Implementations§
impl Freeze for GitHubForge
impl !RefUnwindSafe for GitHubForge
impl Send for GitHubForge
impl Sync for GitHubForge
impl Unpin for GitHubForge
impl UnsafeUnpin for GitHubForge
impl !UnwindSafe for GitHubForge
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more