pub struct RouterBuilder { /* private fields */ }Expand description
Builder for Router
Implementations§
Source§impl RouterBuilder
impl RouterBuilder
pub fn new() -> Self
pub fn strategy(self, strategy: RoutingStrategy) -> Self
pub fn quality_threshold(self, threshold: f64) -> Self
pub fn max_cost(self, cost: f64) -> Self
pub fn cache_enabled(self, enabled: bool) -> Self
pub fn guardrails_enabled(self, enabled: bool) -> Self
pub fn compression_level(self, level: CompressionLevel) -> Self
pub fn add_model(self, model: ModelConfig) -> Self
pub fn build(self) -> Router
Trait Implementations§
Source§impl Debug for RouterBuilder
impl Debug for RouterBuilder
Auto Trait Implementations§
impl Freeze for RouterBuilder
impl RefUnwindSafe for RouterBuilder
impl Send for RouterBuilder
impl Sync for RouterBuilder
impl Unpin for RouterBuilder
impl UnwindSafe for RouterBuilder
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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