summaryrefslogtreecommitdiffstats
path: root/src/client/common.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/common.rs')
-rw-r--r--src/client/common.rs10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/client/common.rs b/src/client/common.rs
index fb0c38e..24e6f8e 100644
--- a/src/client/common.rs
+++ b/src/client/common.rs
@@ -102,8 +102,8 @@ macro_rules! register_client {
}
}
- pub fn name(config: &$config) -> &str {
- config.name.as_deref().unwrap_or(Self::NAME)
+ pub fn name(local_config: &$config) -> &str {
+ local_config.name.as_deref().unwrap_or(Self::NAME)
}
}
@@ -184,6 +184,10 @@ macro_rules! client_common_fns {
Self::list_models(&self.config)
}
+ fn name(&self) -> &str {
+ Self::name(&self.config)
+ }
+
fn model(&self) -> &Model {
&self.model
}
@@ -259,6 +263,8 @@ pub trait Client: Sync + Send {
fn list_models(&self) -> Vec<Model>;
+ fn name(&self) -> &str;
+
fn model(&self) -> &Model;
fn model_mut(&mut self) -> &mut Model;