pub struct Client { /* private fields */ }Expand description
Client for the GitLab REST API v4.
Implementations§
Source§impl Client
impl Client
Sourcepub fn from_project_url(url: &str) -> Result<Self, Box<dyn Error>>
pub fn from_project_url(url: &str) -> Result<Self, Box<dyn Error>>
Create a client for the given GitLab project URL.
Reads the authentication token from GITLAB_TOKEN, falling
back to the config file.
Sourcepub fn new(
base_url: &str,
project_path: &str,
token: &str,
) -> Result<Self, Box<dyn Error>>
pub fn new( base_url: &str, project_path: &str, token: &str, ) -> Result<Self, Box<dyn Error>>
Create a client with explicit parameters.
Sourcepub fn create_issue(
&self,
title: &str,
description: Option<&str>,
labels: Option<&str>,
) -> Result<Issue, Box<dyn Error>>
pub fn create_issue( &self, title: &str, description: Option<&str>, labels: Option<&str>, ) -> Result<Issue, Box<dyn Error>>
Create a new issue.
Sourcepub fn list_issues(
&self,
label: &str,
state: &str,
) -> Result<Vec<Issue>, Box<dyn Error>>
pub fn list_issues( &self, label: &str, state: &str, ) -> Result<Vec<Issue>, Box<dyn Error>>
List issues matching a label and state.
Sourcepub fn edit_issue(
&self,
iid: u64,
updates: &IssueUpdate,
) -> Result<Issue, Box<dyn Error>>
pub fn edit_issue( &self, iid: u64, updates: &IssueUpdate, ) -> Result<Issue, Box<dyn Error>>
Edit an existing issue.
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl UnsafeUnpin for Client
impl !UnwindSafe for Client
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