pub struct Gitlab { /* private fields */ }
Expand description
A representation of the Gitlab API for a single user.
Separate users should use separate instances of this.
Implementations§
source§impl Gitlab
impl Gitlab
sourcepub fn new<H, T>(host: H, token: T) -> Result<Self, GitlabError>where
H: AsRef<str>,
T: Into<String>,
pub fn new<H, T>(host: H, token: T) -> Result<Self, GitlabError>where H: AsRef<str>, T: Into<String>,
Create a new Gitlab API representation.
The token
should be a valid personal access token.
Errors out if token
is invalid.
sourcepub fn new_insecure<H, T>(host: H, token: T) -> Result<Self, GitlabError>where
H: AsRef<str>,
T: Into<String>,
pub fn new_insecure<H, T>(host: H, token: T) -> Result<Self, GitlabError>where H: AsRef<str>, T: Into<String>,
Create a new non-SSL Gitlab API representation.
Errors out if token
is invalid.
sourcepub fn with_oauth2<H, T>(host: H, token: T) -> Result<Self, GitlabError>where
H: AsRef<str>,
T: Into<String>,
pub fn with_oauth2<H, T>(host: H, token: T) -> Result<Self, GitlabError>where H: AsRef<str>, T: Into<String>,
Create a new Gitlab API representation.
The token
should be a valid OAuth2 token.
Errors out if token
is invalid.
sourcepub fn with_oauth2_insecure<H, T>(
host: H,
token: T
) -> Result<Self, GitlabError>where
H: AsRef<str>,
T: Into<String>,
pub fn with_oauth2_insecure<H, T>( host: H, token: T ) -> Result<Self, GitlabError>where H: AsRef<str>, T: Into<String>,
Create a new non-SSL Gitlab API representation.
The token
should be a valid OAuth2 token.
Errors out if token
is invalid.
sourcepub fn builder<H, T>(host: H, token: T) -> GitlabBuilderwhere
H: Into<String>,
T: Into<String>,
pub fn builder<H, T>(host: H, token: T) -> GitlabBuilderwhere H: Into<String>, T: Into<String>,
Create a new Gitlab API client builder.
sourcepub fn graphql<Q>(
&self,
query: &QueryBody<Q::Variables>
) -> Result<Q::ResponseData, GitlabError>where
Q: GraphQLQuery,
Q::Variables: Debug,
for<'d> Q::ResponseData: Deserialize<'d>,
pub fn graphql<Q>( &self, query: &QueryBody<Q::Variables> ) -> Result<Q::ResponseData, GitlabError>where Q: GraphQLQuery, Q::Variables: Debug, for<'d> Q::ResponseData: Deserialize<'d>,
Send a GraphQL query.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Gitlab
impl Send for Gitlab
impl Sync for Gitlab
impl Unpin for Gitlab
impl !UnwindSafe for Gitlab
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