pub struct ProviderMetadata {
pub name: Cow<'static, str>,
pub model: String,
pub context_window: u64,
pub capabilities: HashSet<Capability>,
}Expand description
Describes a provider instance: its name, model, and capabilities.
The name field uses Cow<'static, str> so that built-in
providers can use "anthropic" (zero-alloc) while dynamic or
user-created providers can use owned strings.
Fields§
§name: Cow<'static, str>Human-readable provider name (e.g. "anthropic", "openai").
model: StringThe model identifier (e.g. "claude-sonnet-4-20250514").
context_window: u64Maximum context window size in tokens.
capabilities: HashSet<Capability>Feature flags indicating what this provider supports.
Trait Implementations§
Source§impl Clone for ProviderMetadata
impl Clone for ProviderMetadata
Source§fn clone(&self) -> ProviderMetadata
fn clone(&self) -> ProviderMetadata
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 ProviderMetadata
impl Debug for ProviderMetadata
Source§impl<'de> Deserialize<'de> for ProviderMetadata
impl<'de> Deserialize<'de> for ProviderMetadata
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 PartialEq for ProviderMetadata
impl PartialEq for ProviderMetadata
Source§impl Serialize for ProviderMetadata
impl Serialize for ProviderMetadata
impl Eq for ProviderMetadata
impl StructuralPartialEq for ProviderMetadata
Auto Trait Implementations§
impl Freeze for ProviderMetadata
impl RefUnwindSafe for ProviderMetadata
impl Send for ProviderMetadata
impl Sync for ProviderMetadata
impl Unpin for ProviderMetadata
impl UnwindSafe for ProviderMetadata
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