Struct use_github_api::client::GithubClientBuilder [−][src]
#[non_exhaustive]pub struct GithubClientBuilder<'a> { /* fields omitted */ }
This is supported on crate feature
auth
only.Expand description
A GithubClient
builder.
Allows building a GithubClient
while still setting options like the base URL and auth token. Only useful when either the auth
or enterprise
feature enabled.
Examples
ⓘ
use use_github_api::{GithubClient, GithubClientBuilder}; // If `enterprise` is enabled let client = GithubClientBuilder::new().auth("adS*lkjha(&W3").base_url("https://gh.enterprise.org/api/v3").build().unwrap(); // If `enterprise` is not enabled let client = GithubClientBuilder::new().auth("ghp_kajshdkja").build().unwrap();
Implementations
impl<'a> GithubClientBuilder<'a>
[src]
impl<'a> GithubClientBuilder<'a>
[src]pub fn build(self) -> Result<GithubClient<'a>, Box<dyn StdError>>
[src]
pub fn build(self) -> Result<GithubClient<'a>, Box<dyn StdError>>
[src]Builds the builder and returns a client.
Errors
If either the auth token or the base url is missing, this will error out.
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for GithubClientBuilder<'a>
impl<'a> Send for GithubClientBuilder<'a>
impl<'a> Sync for GithubClientBuilder<'a>
impl<'a> Unpin for GithubClientBuilder<'a>
impl<'a> UnwindSafe for GithubClientBuilder<'a>
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]