Skip to main content

lower_route_limit_ir

Function lower_route_limit_ir 

Source
pub fn lower_route_limit_ir(h: &Handler) -> Option<i64>
Expand description

#1228: a route’s own @limit(maxBody:) annotation, if present — the override half of emitter/workers_entry.rs’s own (now superseded) effective_max_body; the service-wide limits { maxBody } fallback stays that function’s own concern (already IR-native via PolicyIr::max_body_bytes, but read from a service, not a per-route Handler, so it does not move here). Project validation (bynk.http.limit_*/limits_*) has already rejected a malformed or misplaced @limit, so an absent/ill-formed annotation here simply yields None — the caller’s own service-default fallback still applies. No &CheckedProgram needed, same reasoning as lower_route_cache_ir: maxBody is an already-resolved ExprKind::IntLit, not a type.