pub struct DynamicRoutingTable<T> { /* private fields */ }Expand description
A routing table wrapper that adds dynamic route management.
Wraps any T: RoutingTable and layers an in-memory set of dynamic routes
on top. Dynamic routes take precedence during resolution.
Implementations§
Source§impl<T> DynamicRoutingTable<T>
impl<T> DynamicRoutingTable<T>
Trait Implementations§
Source§impl<T: RoutingTable + Sync> AdminRoutingTable for DynamicRoutingTable<T>
impl<T: RoutingTable + Sync> AdminRoutingTable for DynamicRoutingTable<T>
Source§fn remove_route(&self, model: &str) -> Result<bool>
fn remove_route(&self, model: &str) -> Result<bool>
Remove a dynamically-added route. Returns
true if the route existed. Read moreSource§fn list_dynamic_routes(&self) -> Vec<DynamicRoute>
fn list_dynamic_routes(&self) -> Vec<DynamicRoute>
List all dynamically-added routes.
Source§impl<T: RoutingTable + Sync> RoutingTable for DynamicRoutingTable<T>
impl<T: RoutingTable + Sync> RoutingTable for DynamicRoutingTable<T>
Source§async fn route(&self, incoming_model_name: &str) -> Result<RoutingTarget>
async fn route(&self, incoming_model_name: &str) -> Result<RoutingTarget>
Routes an incoming model name to a routing target.
Source§fn list_routes(&self) -> Vec<RouteEntry>
fn list_routes(&self) -> Vec<RouteEntry>
Lists all configured model routes.
Auto Trait Implementations§
impl<T> !Freeze for DynamicRoutingTable<T>
impl<T> RefUnwindSafe for DynamicRoutingTable<T>where
T: RefUnwindSafe,
impl<T> Send for DynamicRoutingTable<T>where
T: Send,
impl<T> Sync for DynamicRoutingTable<T>where
T: Sync,
impl<T> Unpin for DynamicRoutingTable<T>where
T: Unpin,
impl<T> UnsafeUnpin for DynamicRoutingTable<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for DynamicRoutingTable<T>where
T: UnwindSafe,
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