pub struct ChatProviderComponent { /* private fields */ }Expand description
A Component that wraps an existing ChatProvider.
Implementations§
Trait Implementations§
Source§impl Component for ChatProviderComponent
impl Component for ChatProviderComponent
Source§const NAME: &'static str = "ChatProviderComponent"
const NAME: &'static str = "ChatProviderComponent"
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 ChatProviderComponent
impl !UnwindSafe for ChatProviderComponent
impl Freeze for ChatProviderComponent
impl Send for ChatProviderComponent
impl Sync for ChatProviderComponent
impl Unpin for ChatProviderComponent
impl UnsafeUnpin for ChatProviderComponent
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