pub struct RoutingStrategyBuilder { /* private fields */ }Expand description
Helper to compose provider strategies declaratively before handing them to AiClientBuilder.
Implementations§
Source§impl RoutingStrategyBuilder
impl RoutingStrategyBuilder
pub fn new() -> Self
pub fn with_provider(self, provider: Box<dyn ChatProvider>) -> Self
pub fn extend<I>(self, providers: I) -> Self
pub fn build_failover(self) -> Result<FailoverProvider, AiLibError>
pub fn build_round_robin(self) -> Result<RoundRobinProvider, AiLibError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RoutingStrategyBuilder
impl !RefUnwindSafe for RoutingStrategyBuilder
impl Send for RoutingStrategyBuilder
impl Sync for RoutingStrategyBuilder
impl Unpin for RoutingStrategyBuilder
impl !UnwindSafe for RoutingStrategyBuilder
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more