Struct gitlab::GitlabBuilder
source · [−]pub struct GitlabBuilder { /* private fields */ }
Implementations
sourceimpl GitlabBuilder
impl GitlabBuilder
sourcepub fn new<H, T>(host: H, token: T) -> Self where
H: Into<String>,
T: Into<String>,
pub fn new<H, T>(host: H, token: T) -> Self where
H: Into<String>,
T: Into<String>,
Create a new Gitlab API client builder.
sourcepub fn new_unauthenticated<H>(host: H) -> Self where
H: Into<String>,
pub fn new_unauthenticated<H>(host: H) -> Self where
H: Into<String>,
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 RefUnwindSafe for GitlabBuilder
impl Send for GitlabBuilder
impl Sync for GitlabBuilder
impl Unpin for GitlabBuilder
impl UnwindSafe for GitlabBuilder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more