pub struct ClientBuilder { /* private fields */ }Expand description
Builder for Client.
See crate-level documentation for usage example.
Implementations§
Source§impl ClientBuilder
impl ClientBuilder
Sourcepub fn builder() -> ClientBuilderBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), ())>
pub fn builder() -> ClientBuilderBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), ())>
Create a builder for building ClientBuilder.
On the builder, call .github_token(...)(optional), .remaps(...)(optional), .fallback_extensions(...)(optional), .index_files(...)(optional), .includes(...)(optional), .excludes(...)(optional), .exclude_all_private(...)(optional), .exclude_private_ips(...)(optional), .exclude_link_local_ips(...)(optional), .exclude_loopback_ips(...)(optional), .include_mail(...)(optional), .max_redirects(...)(optional), .max_retries(...)(optional), .min_tls_version(...)(optional), .user_agent(...)(optional), .allow_insecure(...)(optional), .schemes(...)(optional), .custom_headers(...)(optional), .method(...)(optional), .accepted(...)(optional), .timeout(...)(optional), .base(...)(optional), .retry_wait_time(...)(optional), .require_https(...)(optional), .cookie_jar(...)(optional), .include_fragments(...)(optional), .plugin_request_chain(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of ClientBuilder.
Source§impl ClientBuilder
impl ClientBuilder
Sourcepub fn client(self) -> Result<Client>
pub fn client(self) -> Result<Client>
Instantiates a Client.
§Errors
Returns an Err if:
- The user-agent contains characters other than ASCII 32-127.
- The reqwest client cannot be instantiated. This occurs if a TLS backend cannot be initialized or the resolver fails to load the system configuration. See here.
- The GitHub client cannot be created. Since the implementation also uses reqwest under the hood, this errors in the same circumstances as the last one.
Trait Implementations§
Source§impl Clone for ClientBuilder
impl Clone for ClientBuilder
Source§fn clone(&self) -> ClientBuilder
fn clone(&self) -> ClientBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ClientBuilder
impl Debug for ClientBuilder
Auto Trait Implementations§
impl Freeze for ClientBuilder
impl !RefUnwindSafe for ClientBuilder
impl Send for ClientBuilder
impl Sync for ClientBuilder
impl Unpin for ClientBuilder
impl !UnwindSafe for ClientBuilder
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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