pub trait AdminRoutingTable: RoutingTable {
// Required methods
fn add_route(&self, route: DynamicRoute) -> Result<()>;
fn remove_route(&self, model: &str) -> Result<bool>;
fn list_dynamic_routes(&self) -> Vec<DynamicRoute>;
}Expand description
Extension trait for routing tables that support runtime route management.
Implementations store dynamic routes separately from config-defined routes. Dynamic routes take precedence during resolution.
Required Methods§
Sourcefn add_route(&self, route: DynamicRoute) -> Result<()>
fn add_route(&self, route: DynamicRoute) -> Result<()>
Create or update a dynamic route.
Sourcefn 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.
Config-defined routes cannot be removed.
Sourcefn list_dynamic_routes(&self) -> Vec<DynamicRoute>
fn list_dynamic_routes(&self) -> Vec<DynamicRoute>
List all dynamically-added routes.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.