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>
pub fn new<H, T>(host: H, token: T) -> Result<Self, GitlabError>
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>
pub fn new_insecure<H, T>(host: H, token: T) -> Result<Self, GitlabError>
Create a new non-SSL Gitlab API representation.
Errors out if token
is invalid.
sourcepub fn new_job_token<H, T>(host: H, token: T) -> Result<Self, GitlabError>
pub fn new_job_token<H, T>(host: H, token: T) -> Result<Self, GitlabError>
Create a new Gitlab API representation.
The token
should be a valid job token.
Errors out if token
is invalid.
sourcepub fn new_job_token_insecure<H, T>(
host: H,
token: T
) -> Result<Self, GitlabError>
pub fn new_job_token_insecure<H, T>( host: H, token: T ) -> Result<Self, GitlabError>
Create a new non-SSL Gitlab API representation.
The token
should be a valid job token.
Errors out if token
is invalid.
sourcepub fn with_oauth2<H, T>(host: H, token: T) -> Result<Self, GitlabError>
pub fn with_oauth2<H, T>(host: H, token: T) -> Result<Self, GitlabError>
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>
pub fn with_oauth2_insecure<H, T>( host: H, token: T ) -> Result<Self, GitlabError>
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) -> GitlabBuilder
pub fn builder<H, T>(host: H, token: T) -> GitlabBuilder
Create a new Gitlab API client builder.
sourcepub fn graphql<Q>(
&self,
query: &QueryBody<Q::Variables>
) -> Result<Q::ResponseData, GitlabError>
pub fn graphql<Q>( &self, query: &QueryBody<Q::Variables> ) -> Result<Q::ResponseData, GitlabError>
Send a GraphQL query.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Gitlab
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more