RateLimitPolicy class final

Represents a policy for rate limiting.

This policy specifies how many requests are allowed in a specific time window.

Constructors

RateLimitPolicy({required int limitCount, required Duration window})
Creates a RateLimitPolicy with a specified limit count and window.
const
RateLimitPolicy.unlimited()
Creates a RateLimitPolicy which represents an unlimited rate limit.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
limitCount int
Maximum number of allowed requests in the window.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
window Duration
Time window for the rate limit.
final

Methods

format() String
Formats the policy for representation in the HTTP response header.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited