Start moving to Rocket 0.5.0

This commit is contained in:
Paul authored and Paul Makles committed 2021-08-06 17:24:16 +01:00
1 parent 33262cc703
commit 9fec4e48c0
62 files changed
+821 -421

No files matched your search

+1
View File
@@ -1,2 +1,3 @@
pub mod result;
pub mod variables;
pub mod ratelimit;
+9
View File
@@ -0,0 +1,9 @@
use rocket_governor::{Method, Quota, RocketGovernable, RocketGovernor};
pub struct RateLimitGuard;
impl<'r> RocketGovernable<'r> for RateLimitGuard {
fn quota(_method: Method, _route_name: &str) -> Quota {
Quota::per_second(Self::nonzero(1u32))
}
}