pub struct RegistryBuilder { /* private fields */ }Expand description
Builder for creating and configuring service registries
Implementations§
Source§impl RegistryBuilder
impl RegistryBuilder
Sourcepub fn with_service<T: Any + Send + Sync>(self, service: T) -> Self
pub fn with_service<T: Any + Send + Sync>(self, service: T) -> Self
Register a service and continue building
Sourcepub fn with_storage<S>(self, storage: S) -> Self
pub fn with_storage<S>(self, storage: S) -> Self
Register a storage implementation
Sourcepub fn with_embedder<E>(self, embedder: E) -> Self
pub fn with_embedder<E>(self, embedder: E) -> Self
Register an embedder implementation
Sourcepub fn with_vector_store<V>(self, vector_store: V) -> Self
pub fn with_vector_store<V>(self, vector_store: V) -> Self
Register a vector store implementation
Sourcepub fn with_entity_extractor<E>(self, extractor: E) -> Self
pub fn with_entity_extractor<E>(self, extractor: E) -> Self
Register an entity extractor implementation
Sourcepub fn with_retriever<R>(self, retriever: R) -> Self
pub fn with_retriever<R>(self, retriever: R) -> Self
Register a retriever implementation
Sourcepub fn with_language_model<L>(self, language_model: L) -> Self
pub fn with_language_model<L>(self, language_model: L) -> Self
Register a language model implementation
Sourcepub fn with_graph_store<G>(self, graph_store: G) -> Self
pub fn with_graph_store<G>(self, graph_store: G) -> Self
Register a graph store implementation
Sourcepub fn with_function_registry<F>(self, function_registry: F) -> Self
pub fn with_function_registry<F>(self, function_registry: F) -> Self
Register a function registry implementation
Sourcepub fn with_metrics_collector<M>(self, metrics: M) -> Self
pub fn with_metrics_collector<M>(self, metrics: M) -> Self
Register a metrics collector implementation
Sourcepub fn with_serializer<S>(self, serializer: S) -> Self
pub fn with_serializer<S>(self, serializer: S) -> Self
Register a serializer implementation
Sourcepub fn build(self) -> ServiceRegistry
pub fn build(self) -> ServiceRegistry
Build the final registry
Sourcepub fn with_test_defaults() -> Self
pub fn with_test_defaults() -> Self
Create a registry with memory-only services for testing
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RegistryBuilder
impl !RefUnwindSafe for RegistryBuilder
impl Send for RegistryBuilder
impl Sync for RegistryBuilder
impl Unpin for RegistryBuilder
impl UnsafeUnpin for RegistryBuilder
impl !UnwindSafe for RegistryBuilder
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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