pub struct ClientBuilder { /* private fields */ }
Expand description
The builder for the Client
structure.
ClientBuilder::default()
Client::builder()
Implementations§
Source§impl ClientBuilder
Builder methods
impl ClientBuilder
Builder methods
Sourcepub fn with_reqwest(self, reqwest_client: Client) -> Self
pub fn with_reqwest(self, reqwest_client: Client) -> Self
Create a new ClientBuilder with a custom reqwest::Client
.
Sourcepub fn with_config(self, config: ClientConfig) -> Self
pub fn with_config(self, config: ClientConfig) -> Self
With a client configuration.
Source§impl ClientBuilder
Builder ClientConfig passthrough convenient setters.
The goal of these functions is to set nested values such as ClientConfig.
impl ClientBuilder
Builder ClientConfig passthrough convenient setters. The goal of these functions is to set nested values such as ClientConfig.
Sourcepub fn with_chat_options(self, options: ChatOptions) -> Self
pub fn with_chat_options(self, options: ChatOptions) -> Self
Set the ChatOptions for the ClientConfig of this ClientBuilder.
This will create the ClientConfig if it is not present.
Otherwise, it will just set the client_config.chat_options
.
Sourcepub fn with_auth_resolver(self, auth_resolver: AuthResolver) -> Self
pub fn with_auth_resolver(self, auth_resolver: AuthResolver) -> Self
Set the authentication resolver for the ClientConfig of this ClientBuilder.
Sourcepub fn with_auth_resolver_fn(
self,
auth_resolver_fn: impl IntoAuthResolverFn,
) -> Self
pub fn with_auth_resolver_fn( self, auth_resolver_fn: impl IntoAuthResolverFn, ) -> Self
Set the authentication resolver function for the ClientConfig of this ClientBuilder.
pub fn with_service_target_resolver( self, target_resolver: ServiceTargetResolver, ) -> Self
pub fn with_service_target_resolver_fn( self, target_resolver_fn: impl IntoServiceTargetResolverFn, ) -> Self
Sourcepub fn with_model_mapper(self, model_mapper: ModelMapper) -> Self
pub fn with_model_mapper(self, model_mapper: ModelMapper) -> Self
Set the model mapper for the ClientConfig of this ClientBuilder.
Sourcepub fn with_model_mapper_fn(
self,
model_mapper_fn: impl IntoModelMapperFn,
) -> Self
pub fn with_model_mapper_fn( self, model_mapper_fn: impl IntoModelMapperFn, ) -> Self
Set the model mapper function for the ClientConfig of this ClientBuilder.
Trait Implementations§
Source§impl Debug for ClientBuilder
impl Debug for ClientBuilder
Source§impl Default for ClientBuilder
impl Default for ClientBuilder
Source§fn default() -> ClientBuilder
fn default() -> ClientBuilder
Returns the “default value” for a type. Read more
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
Mutably borrows from an owned value. Read more