pub struct ClientConfig { /* private fields */ }Expand description
The Client configuration used in the configuration builder stage.
Implementations§
Source§impl ClientConfig
Chainable setters related to the ClientConfig.
impl ClientConfig
Chainable setters related to the ClientConfig.
Sourcepub fn with_auth_resolver(self, auth_resolver: AuthResolver) -> Self
pub fn with_auth_resolver(self, auth_resolver: AuthResolver) -> Self
Set the AuthResolver for the ClientConfig.
Note: This will be called before the service_target_resolver, and if registered
the service_target_resolver will receive this new value.
Sourcepub fn with_model_mapper(self, model_mapper: ModelMapper) -> Self
pub fn with_model_mapper(self, model_mapper: ModelMapper) -> Self
Set the ModelMapper for the ClientConfig.
Note: This will be called before the service_target_resolver, and if registered
the service_target_resolver will receive this new value.
Sourcepub fn with_service_target_resolver(
self,
service_target_resolver: ServiceTargetResolver,
) -> Self
pub fn with_service_target_resolver( self, service_target_resolver: ServiceTargetResolver, ) -> Self
Set the ServiceTargetResolver for this client config.
A ServiceTargetResolver is the last step before execution, allowing the users full control of the resolved Endpoint, AuthData, and ModelIden.
Sourcepub fn with_chat_options(self, options: ChatOptions) -> Self
pub fn with_chat_options(self, options: ChatOptions) -> Self
Set the default chat request options for the ClientConfig.
Source§impl ClientConfig
Getters for the fields of ClientConfig (as references).
impl ClientConfig
Getters for the fields of ClientConfig (as references).
Sourcepub fn auth_resolver(&self) -> Option<&AuthResolver>
pub fn auth_resolver(&self) -> Option<&AuthResolver>
Get a reference to the AuthResolver, if it exists.
pub fn service_target_resolver(&self) -> Option<&ServiceTargetResolver>
Sourcepub fn model_mapper(&self) -> Option<&ModelMapper>
pub fn model_mapper(&self) -> Option<&ModelMapper>
Get a reference to the ModelMapper, if it exists.
Sourcepub fn chat_options(&self) -> Option<&ChatOptions>
pub fn chat_options(&self) -> Option<&ChatOptions>
Get a reference to the ChatOptions, if they exist.
Source§impl ClientConfig
Resolvers
impl ClientConfig
Resolvers
pub fn resolve_service_target(&self, model: ModelIden) -> Result<ServiceTarget>
Trait Implementations§
Source§impl Clone for ClientConfig
impl Clone for ClientConfig
Source§fn clone(&self) -> ClientConfig
fn clone(&self) -> ClientConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more