pub fn build_rpc_ops_filter(
ops: &'static [OpDescriptor],
) -> impl Fn(&Request<Body>) + Send + SyncExpand description
Build a rate-limit filter function for RPC schemas.
Returns a function that:
- Extracts
op_idfrom/rpc/{op_id}paths - Looks up the op in the provided descriptors
- Returns
false(exempt) ifrate_limited_by_defaultis false - Returns
true(apply rate limit) if the op participates, or if lookup fails
Fails closed: if descriptor lookup misses for any reason, the op is rate-limited. This prevents accidental exemptions from missing data.
/rpc/batch is always rate-limited regardless of its contents — see
the module-level “Known limitation” doc above.