pub struct ValidationRateLimiter { /* private fields */ }Expand description
Validation-specific rate limiter with per-dimension tracking
Implementations§
Source§impl ValidationRateLimiter
impl ValidationRateLimiter
Sourcepub fn new(config: &ValidationRateLimitingConfig) -> Self
pub fn new(config: &ValidationRateLimitingConfig) -> Self
Create a new validation rate limiter with the given configuration.
Sourcepub fn new_with_clock(
config: &ValidationRateLimitingConfig,
clock: Arc<dyn Clock>,
) -> Self
pub fn new_with_clock( config: &ValidationRateLimitingConfig, clock: Arc<dyn Clock>, ) -> Self
Create a validation rate limiter with a custom clock (for testing).
Sourcepub fn check_validation_errors(&self, key: &str) -> Result<(), FraiseQLError>
pub fn check_validation_errors(&self, key: &str) -> Result<(), FraiseQLError>
Check rate limit for validation errors.
§Errors
Returns FraiseQLError::RateLimited if the key has exceeded the
validation-errors rate limit within the configured window.
Sourcepub fn check_depth_errors(&self, key: &str) -> Result<(), FraiseQLError>
pub fn check_depth_errors(&self, key: &str) -> Result<(), FraiseQLError>
Check rate limit for depth errors.
§Errors
Returns FraiseQLError::RateLimited if the key has exceeded the
depth-errors rate limit within the configured window.
Sourcepub fn check_complexity_errors(&self, key: &str) -> Result<(), FraiseQLError>
pub fn check_complexity_errors(&self, key: &str) -> Result<(), FraiseQLError>
Check rate limit for complexity errors.
§Errors
Returns FraiseQLError::RateLimited if the key has exceeded the
complexity-errors rate limit within the configured window.
Sourcepub fn check_malformed_errors(&self, key: &str) -> Result<(), FraiseQLError>
pub fn check_malformed_errors(&self, key: &str) -> Result<(), FraiseQLError>
Check rate limit for malformed errors.
§Errors
Returns FraiseQLError::RateLimited if the key has exceeded the
malformed-errors rate limit within the configured window.
Sourcepub fn check_async_validation_errors(
&self,
key: &str,
) -> Result<(), FraiseQLError>
pub fn check_async_validation_errors( &self, key: &str, ) -> Result<(), FraiseQLError>
Check rate limit for async validation errors.
§Errors
Returns FraiseQLError::RateLimited if the key has exceeded the
async-validation-errors rate limit within the configured window.
Trait Implementations§
Source§impl Clone for ValidationRateLimiter
impl Clone for ValidationRateLimiter
Source§fn clone(&self) -> ValidationRateLimiter
fn clone(&self) -> ValidationRateLimiter
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more