pub struct EmbeddingProviderRegistry { /* private fields */ }Implementations§
Source§impl EmbeddingProviderRegistry
impl EmbeddingProviderRegistry
pub fn new() -> EmbeddingProviderRegistry
Sourcepub fn with_max_blocking_concurrency(
max_concurrency: usize,
) -> EmbeddingProviderRegistry
pub fn with_max_blocking_concurrency( max_concurrency: usize, ) -> EmbeddingProviderRegistry
Registry with an explicit blocking-provider concurrency ceiling.
pub fn register_new( &self, provider: Arc<dyn EmbeddingProvider>, ) -> Result<u64, EmbeddingError>
Sourcepub fn register(&self, provider: Arc<dyn EmbeddingProvider>)
👎Deprecated: use register_new and handle duplicate provider IDs
pub fn register(&self, provider: Arc<dyn EmbeddingProvider>)
use register_new and handle duplicate provider IDs
Compatibility entry point for 0.60.3 Kit clients. Duplicate IDs keep the existing provider instead of silently replacing it.
pub fn replace( &self, expected_generation: u64, provider: Arc<dyn EmbeddingProvider>, ) -> Result<u64, EmbeddingError>
pub fn get(&self, provider_id: &str) -> Option<Arc<dyn EmbeddingProvider>>
pub fn list_ids(&self) -> Vec<String>
pub fn status(&self, provider_id: &str) -> Option<ProviderStatus>
pub fn resolve( &self, source: &EmbeddingSource, ) -> Result<Arc<dyn EmbeddingProvider>, EmbeddingError>
pub fn embed( &self, source: &EmbeddingSource, texts: &[&str], expected_dim: u32, ) -> Result<Vec<Vec<f32>>, EmbeddingError>
pub fn embed_controlled( &self, source: &EmbeddingSource, texts: &[&str], expected_dim: u32, control: &ExecutionControl, trace_id: &str, limits: EmbeddingLimits, ) -> Result<Vec<Vec<f32>>, EmbeddingError>
Sourcepub async fn embed_async_controlled(
&self,
source: &EmbeddingSource,
texts: &[&str],
expected_dim: u32,
control: &ExecutionControl,
trace_id: &str,
limits: EmbeddingLimits,
) -> Result<Vec<Vec<f32>>, EmbeddingError>
pub async fn embed_async_controlled( &self, source: &EmbeddingSource, texts: &[&str], expected_dim: u32, control: &ExecutionControl, trace_id: &str, limits: EmbeddingLimits, ) -> Result<Vec<Vec<f32>>, EmbeddingError>
Async provider execution for server/runtime callers.
Blocking local providers run under a bounded semaphore on Tokio’s
blocking pool. Remote providers must implement embed_async; both
paths stop waiting when the execution control is cancelled or expires.
Trait Implementations§
Source§impl Clone for EmbeddingProviderRegistry
impl Clone for EmbeddingProviderRegistry
Source§fn clone(&self) -> EmbeddingProviderRegistry
fn clone(&self) -> EmbeddingProviderRegistry
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 EmbeddingProviderRegistry
impl Debug for EmbeddingProviderRegistry
Source§impl Default for EmbeddingProviderRegistry
impl Default for EmbeddingProviderRegistry
Source§fn default() -> EmbeddingProviderRegistry
fn default() -> EmbeddingProviderRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for EmbeddingProviderRegistry
impl RefUnwindSafe for EmbeddingProviderRegistry
impl Send for EmbeddingProviderRegistry
impl Sync for EmbeddingProviderRegistry
impl Unpin for EmbeddingProviderRegistry
impl UnsafeUnpin for EmbeddingProviderRegistry
impl UnwindSafe for EmbeddingProviderRegistry
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more