pub struct EmbeddingProviderComponent { /* private fields */ }Expand description
A Component that wraps an existing EmbeddingProvider.
Implementations§
Trait Implementations§
Source§impl Component for EmbeddingProviderComponent
impl Component for EmbeddingProviderComponent
Source§const NAME: &'static str = "EmbeddingProviderComponent"
const NAME: &'static str = "EmbeddingProviderComponent"
Stable identifier for the component kind (e.g.
"provider.openai",
"store.session.redis"). Used in configuration and logging.Source§type Config = EmptyConfig
type Config = EmptyConfig
Configuration shape. Must be deserializable from JSON/YAML/TOML and
must produce a valid JSON Schema for documentation and validation.
Source§type Error = WrapperError
type Error = WrapperError
Error type for lifecycle phases. Must implement
std::error::Error
so the registry can chain and format errors uniformly.Source§fn init<'life0, 'life1, 'async_trait>(
_cfg: &'life0 Self::Config,
_ctx: &'life1 ComponentContext,
) -> Pin<Box<dyn Future<Output = Result<Self, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn init<'life0, 'life1, 'async_trait>(
_cfg: &'life0 Self::Config,
_ctx: &'life1 ComponentContext,
) -> Pin<Box<dyn Future<Output = Result<Self, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Construct a component instance from its validated configuration. Read more
Source§fn start<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn start<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Begin serving. Default is a no-op. Override to spawn workers, open
connections, or warm caches. Read more
Source§fn stop<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn stop<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Stop serving. Default is a no-op. Override to drain queues, close
connections, and persist state. Read more
Source§fn health<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = HealthStatus> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn health<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = HealthStatus> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Non-mutating health probe. Default is
HealthStatus::healthy.
Override to surface upstream connectivity, queue depth, retry
pressure, etc.Source§fn depends_on() -> &'static [&'static str]
fn depends_on() -> &'static [&'static str]
Names of components this component depends on. Used by the registry
to build a dependency graph and drive ordered initialization.
Auto Trait Implementations§
impl !RefUnwindSafe for EmbeddingProviderComponent
impl !UnwindSafe for EmbeddingProviderComponent
impl Freeze for EmbeddingProviderComponent
impl Send for EmbeddingProviderComponent
impl Sync for EmbeddingProviderComponent
impl Unpin for EmbeddingProviderComponent
impl UnsafeUnpin for EmbeddingProviderComponent
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