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 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for ValidationRateLimiter
impl !RefUnwindSafe for ValidationRateLimiter
impl Send for ValidationRateLimiter
impl Sync for ValidationRateLimiter
impl Unpin for ValidationRateLimiter
impl UnsafeUnpin for ValidationRateLimiter
impl !UnwindSafe for ValidationRateLimiter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more