pub struct ProviderName(/* private fields */);Expand description
Strongly-typed LLM provider name.
ProviderName identifies a configured provider by its name field (e.g., "fast",
"quality", "ollama-local"). Names come from [[llm.providers]] name = "…" in the
TOML config; subsystems reference providers by this name via *_provider fields.
§Inner type: Arc<str>
The inner type is Arc<str>. Provider names are cloned widely across subsystem config
structs, metric labels, and log spans. Arc<str> makes all clones O(1).
§No Deref<Target=str>
ProviderName does not implement Deref<Target=str>. Use .as_str() for explicit
string conversion and .clone() to duplicate.
§Examples
use zeph_common::ProviderName;
let name = ProviderName::new("fast");
assert_eq!(name.as_str(), "fast");
assert_eq!(name, "fast");
// Clone is O(1) — Arc reference count increment only.
let name2 = name.clone();
assert_eq!(name, name2);Implementations§
Trait Implementations§
Source§impl AsRef<str> for ProviderName
impl AsRef<str> for ProviderName
Source§impl Borrow<str> for ProviderName
impl Borrow<str> for ProviderName
Source§impl Clone for ProviderName
impl Clone for ProviderName
Source§fn clone(&self) -> ProviderName
fn clone(&self) -> ProviderName
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProviderName
impl Debug for ProviderName
Source§impl Default for ProviderName
impl Default for ProviderName
Source§impl<'de> Deserialize<'de> for ProviderName
impl<'de> Deserialize<'de> for ProviderName
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for ProviderName
impl Display for ProviderName
Source§impl From<&str> for ProviderName
impl From<&str> for ProviderName
Source§impl From<String> for ProviderName
impl From<String> for ProviderName
Source§impl FromStr for ProviderName
impl FromStr for ProviderName
Source§impl Hash for ProviderName
impl Hash for ProviderName
Source§impl PartialEq<&str> for ProviderName
impl PartialEq<&str> for ProviderName
Source§impl PartialEq<ProviderName> for String
impl PartialEq<ProviderName> for String
Source§impl PartialEq<ProviderName> for str
impl PartialEq<ProviderName> for str
Source§impl PartialEq<String> for ProviderName
impl PartialEq<String> for ProviderName
Source§impl PartialEq<str> for ProviderName
impl PartialEq<str> for ProviderName
Source§impl PartialEq for ProviderName
impl PartialEq for ProviderName
Source§impl Serialize for ProviderName
impl Serialize for ProviderName
impl Eq for ProviderName
impl StructuralPartialEq for ProviderName
Auto Trait Implementations§
impl Freeze for ProviderName
impl RefUnwindSafe for ProviderName
impl Send for ProviderName
impl Sync for ProviderName
impl Unpin for ProviderName
impl UnsafeUnpin for ProviderName
impl UnwindSafe for ProviderName
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