Skip to main content

AdminRoutingTable

Trait AdminRoutingTable 

Source
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§

Source

fn add_route(&self, route: DynamicRoute) -> Result<()>

Create or update a dynamic route.

Source

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.

Source

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.

Implementors§