ClientBuilder in lychee_lib - Rust (original) (raw)
Struct ClientBuilder
pub struct ClientBuilder { /* private fields */ }
Expand description
Builder for Client.
See crate-level documentation for usage example.
Create a builder for building ClientBuilder
. On the builder, call .github_token(...)
(optional), .remaps(...)
(optional), .fallback_extensions(...)
(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), .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
.
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.