pub struct CapabilityRegistry { /* private fields */ }Expand description
Registry holding capabilities for all known backends.
Provides feature discovery so the policy engine and validation framework know which intents can be expressed on which targets.
Implementations§
Source§impl CapabilityRegistry
impl CapabilityRegistry
Sourcepub fn with_defaults() -> Self
pub fn with_defaults() -> Self
Create a registry pre-populated with known Anthropic and OpenAI capabilities.
Sourcepub fn register_backend(&mut self, caps: BackendCapabilities)
pub fn register_backend(&mut self, caps: BackendCapabilities)
Register a backend’s capabilities in the registry.
Sourcepub fn get_backend(&self, backend_id: &str) -> Option<&BackendCapabilities>
pub fn get_backend(&self, backend_id: &str) -> Option<&BackendCapabilities>
Retrieve a backend’s capabilities by ID.
Sourcepub fn supports_feature(
&self,
backend_id: &str,
feature: ProviderFeature,
) -> bool
pub fn supports_feature( &self, backend_id: &str, feature: ProviderFeature, ) -> bool
Check if a backend supports a feature at the backend level.
Sourcepub fn model_supports_feature(
&self,
backend_id: &str,
model_family: &str,
feature: ProviderFeature,
) -> bool
pub fn model_supports_feature( &self, backend_id: &str, model_family: &str, feature: ProviderFeature, ) -> bool
Check if a specific model family on a backend supports a feature.
Falls back to backend-level if the model family is not registered.
Sourcepub fn list_backend_ids(&self) -> Vec<String>
pub fn list_backend_ids(&self) -> Vec<String>
Return a sorted list of all registered backend IDs.
Trait Implementations§
Source§impl Clone for CapabilityRegistry
impl Clone for CapabilityRegistry
Source§fn clone(&self) -> CapabilityRegistry
fn clone(&self) -> CapabilityRegistry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CapabilityRegistry
impl Debug for CapabilityRegistry
Source§impl Default for CapabilityRegistry
impl Default for CapabilityRegistry
Source§fn default() -> CapabilityRegistry
fn default() -> CapabilityRegistry
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for CapabilityRegistry
impl<'de> Deserialize<'de> for CapabilityRegistry
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
Auto Trait Implementations§
impl Freeze for CapabilityRegistry
impl RefUnwindSafe for CapabilityRegistry
impl Send for CapabilityRegistry
impl Sync for CapabilityRegistry
impl Unpin for CapabilityRegistry
impl UnsafeUnpin for CapabilityRegistry
impl UnwindSafe for CapabilityRegistry
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