Struct gitlab::GitlabBuilder
source · pub struct GitlabBuilder { /* private fields */ }
Implementations§
source§impl GitlabBuilder
impl GitlabBuilder
sourcepub fn new_unauthenticated<H>(host: H) -> Self
pub fn new_unauthenticated<H>(host: H) -> Self
Create a new unauthenticated Gitlab API client builder.
sourcepub fn insecure(&mut self) -> &mut Self
pub fn insecure(&mut self) -> &mut Self
Switch to an insecure protocol (http instead of https).
pub fn cert_insecure(&mut self) -> &mut Self
sourcepub fn oauth2_token(&mut self) -> &mut Self
pub fn oauth2_token(&mut self) -> &mut Self
Switch to using an OAuth2 token instead of a personal access token
sourcepub fn client_identity_from_der(
&mut self,
der: &[u8],
password: &str
) -> &mut Self
pub fn client_identity_from_der( &mut self, der: &[u8], password: &str ) -> &mut Self
Authenticate to Gitlab with the provided DER-formatted PKCS#12 archive.
sourcepub fn client_identity_from_pem(&mut self, pem: &[u8]) -> &mut Self
pub fn client_identity_from_pem(&mut self, pem: &[u8]) -> &mut Self
Authenticate to Gitlab with the provided PEM-encoded private key and certificate.
pub fn build(&self) -> Result<Gitlab, GitlabError>
pub async fn build_async(&self) -> Result<AsyncGitlab, GitlabError>
Auto Trait Implementations§
impl Freeze for GitlabBuilder
impl RefUnwindSafe for GitlabBuilder
impl Send for GitlabBuilder
impl Sync for GitlabBuilder
impl Unpin for GitlabBuilder
impl UnwindSafe for GitlabBuilder
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
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>
Converts
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>
Converts
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