pub struct RouterBuilder { /* private fields */ }Expand description
Builder for creating routers with custom configuration
Implementations§
Source§impl RouterBuilder
impl RouterBuilder
pub fn new() -> Self
pub fn config(self, config: RouterConfig) -> Self
pub fn catalog(self, catalog: Arc<ModelCatalog>) -> Self
pub fn health(self, health: Arc<HealthChecker>) -> Self
pub fn circuit_breaker(self, cb: Arc<CircuitBreaker>) -> Self
pub fn policy(self, policy: CompositePolicy) -> Self
pub fn build(self) -> Router
Trait Implementations§
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
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