Skip to main content

openauth_core/plugin/
rate_limit.rs

1//! Plugin rate-limit rule contributions.
2
3use crate::options::RateLimitRule;
4
5/// Rate-limit rule contributed by a plugin.
6#[derive(Debug, Clone, PartialEq, Eq)]
7pub struct PluginRateLimitRule {
8    pub path: String,
9    pub rule: RateLimitRule,
10}
11
12impl PluginRateLimitRule {
13    pub fn new(path: impl Into<String>, rule: RateLimitRule) -> Self {
14        Self {
15            path: path.into(),
16            rule,
17        }
18    }
19}