Skip to main content

clamp_limit

Function clamp_limit 

Source
pub fn clamp_limit(requested: Option<usize>) -> usize
Expand description

Clamp a requested page size into 1..=MAX_LIMIT, defaulting when absent. Shared so every list endpoint agrees on the bounds — the menus list previously re-derived them and could have drifted.