Skip to main content

parse_routing_rules

Function parse_routing_rules 

Source
pub fn parse_routing_rules(bytes: &[u8]) -> Result<RoutingConfig, String>
Expand description

Parse and validate routing-rules file bytes. Every validation failure names the file and the offending rule (index + field, via crate::routing::validate_table); parse failures carry the serde location. An EMPTY table is refused too — a present file IS the routing table, so {} would silently demote routing to the legacy task-class floor; the refusal names the file and points at the fix (delete the file to keep the layered config). A valid file converts into the engine’s RoutingConfig verbatim — both rule forms, order preserved.