QueryParamLimiter

Trait QueryParamLimiter 

Source
pub trait QueryParamLimiter {
    const PARAM_NAME: &'static str;
    const LIMIT: usize;

    // Provided method
    fn check(size: usize) -> Result<(), QueryLimitError> { ... }
}
Expand description

Checks limits against the desired query parameters, per query parameter and bails if they exceed a defined value.

Required Associated Constants§

Source

const PARAM_NAME: &'static str

Name of the parameter to mention in the error.

Source

const LIMIT: usize

Limit that causes a bail if exceeded.

Provided Methods§

Source

fn check(size: usize) -> Result<(), QueryLimitError>

Do the actual check.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§