pub fn admit_rate_limited_request_runtime_local(
app: &AppRuntime,
policy_key: &str,
bucket_key: &str,
maximum: usize,
window_seconds: u64,
) -> Result<bool, i32>Expand description
Atomically admits one request under a bounded state-backed rate-limit window.
§Parameters
app: Input consumed bycrate::runtime::dynamic::admit_rate_limited_request_runtime_local.policy_key: Input consumed bycrate::runtime::dynamic::admit_rate_limited_request_runtime_local.bucket_key: Input consumed bycrate::runtime::dynamic::admit_rate_limited_request_runtime_local.maximum: Input consumed bycrate::runtime::dynamic::admit_rate_limited_request_runtime_local.window_seconds: Input consumed bycrate::runtime::dynamic::admit_rate_limited_request_runtime_local.
§Returns
Returns the successful value produced by crate::runtime::dynamic::admit_rate_limited_request_runtime_local or an error when the operation fails.
§Errors
Returns an error value when crate::runtime::dynamic::admit_rate_limited_request_runtime_local cannot complete successfully.
§Performance
Performance is proportional to the size of the supplied inputs and any parsed or loaded data consumed by crate::runtime::dynamic::admit_rate_limited_request_runtime_local.
§Examples
ⓘ
let _result = pharos_native::runtime::dynamic::admit_rate_limited_request_runtime_local(todo!(), todo!(), todo!(), todo!(), todo!());§Related
crate::runtime::dynamicfor adjacent helpers that share the same runtime surface.