pub struct Route {
pub id: Uuid,
pub name: String,
pub priority: u32,
pub enabled: bool,
pub when: RouteConditions,
pub then: RouteAction,
}Expand description
A single routing rule. When Route::when matches the request, the
caller rewrites request.model to [Route::then::target_model] (and may
observe the Route::id for telemetry attribution).
Fields§
§id: UuidStable id — used in request_logs.matched_route_id for attribution.
name: StringHuman-readable name, surfaced in dashboards.
priority: u32Higher value wins on tie-breaker; engine evaluates descending.
enabled: boolDisabled routes never match.
when: RouteConditionsAND-ed match conditions. Empty / None fields match anything.
then: RouteActionWhat to do when matched.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Route
impl<'de> Deserialize<'de> for Route
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Route
impl RefUnwindSafe for Route
impl Send for Route
impl Sync for Route
impl Unpin for Route
impl UnsafeUnpin for Route
impl UnwindSafe for Route
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