pub struct RouteMatch {
pub requires_tools: Option<bool>,
pub min_tools: Option<usize>,
pub thinking: Option<bool>,
pub min_reasoning_effort: Option<ReasoningEffort>,
pub stream: Option<bool>,
pub min_input_tokens: Option<u32>,
pub response_format: Option<ResponseFormatKind>,
}Expand description
Request-shape predicates a route can require beyond the model glob.
Every field is optional; an absent predicate is a wildcard, so an empty
block matches all requests. The trustworthy discriminators in real agent
loops are thinking / min_reasoning_effort / stream and the model name
itself — the full tool catalogue is typically resent on every step, so
requires_tools / min_tools are weak signals retained for completeness.
Fields§
§requires_tools: Option<bool>§min_tools: Option<usize>§thinking: Option<bool>§min_reasoning_effort: Option<ReasoningEffort>§stream: Option<bool>§min_input_tokens: Option<u32>§response_format: Option<ResponseFormatKind>Implementations§
Source§impl RouteMatch
impl RouteMatch
Sourcepub fn matches_request(&self, request: &CanonicalRequest) -> bool
pub fn matches_request(&self, request: &CanonicalRequest) -> bool
True when every set predicate holds for request; absent predicates are
ignored.
Sourcepub fn matched_predicates(&self) -> Vec<&'static str>
pub fn matched_predicates(&self) -> Vec<&'static str>
Names of the predicates that are set, in declaration order — the basis for the route-match audit descriptor.
Sourcepub const fn validate(&self) -> GatewayResult<()>
pub const fn validate(&self) -> GatewayResult<()>
Rejects predicate combinations that can never match: a zero min_tools
(vacuous), and requires_tools: false paired with a positive
min_tools (contradiction).
Trait Implementations§
Source§impl Clone for RouteMatch
impl Clone for RouteMatch
Source§fn clone(&self) -> RouteMatch
fn clone(&self) -> RouteMatch
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for RouteMatch
Source§impl Debug for RouteMatch
impl Debug for RouteMatch
Source§impl Default for RouteMatch
impl Default for RouteMatch
Source§fn default() -> RouteMatch
fn default() -> RouteMatch
Source§impl<'de> Deserialize<'de> for RouteMatch
impl<'de> Deserialize<'de> for RouteMatch
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>,
Source§impl JsonSchema for RouteMatch
impl JsonSchema for RouteMatch
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for RouteMatch
impl RefUnwindSafe for RouteMatch
impl Send for RouteMatch
impl Sync for RouteMatch
impl Unpin for RouteMatch
impl UnsafeUnpin for RouteMatch
impl UnwindSafe for RouteMatch
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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>
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>
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