[−][src]Struct limitador::RateLimiter
Implementations
impl RateLimiter
[src]
pub fn new() -> RateLimiter
[src]
pub fn new_with_storage(storage: Box<dyn Storage>) -> RateLimiter
[src]
pub fn get_namespaces(&self) -> Result<HashSet<Namespace>, LimitadorError>
[src]
pub fn add_limit(&self, limit: &Limit) -> Result<(), LimitadorError>
[src]
pub fn delete_limit(&self, limit: &Limit) -> Result<(), LimitadorError>
[src]
pub fn get_limits(
&self,
namespace: impl Into<Namespace>
) -> Result<HashSet<Limit>, LimitadorError>
[src]
&self,
namespace: impl Into<Namespace>
) -> Result<HashSet<Limit>, LimitadorError>
pub fn delete_limits(
&self,
namespace: impl Into<Namespace>
) -> Result<(), LimitadorError>
[src]
&self,
namespace: impl Into<Namespace>
) -> Result<(), LimitadorError>
pub fn is_rate_limited(
&self,
namespace: impl Into<Namespace>,
values: &HashMap<String, String>,
delta: i64
) -> Result<bool, LimitadorError>
[src]
&self,
namespace: impl Into<Namespace>,
values: &HashMap<String, String>,
delta: i64
) -> Result<bool, LimitadorError>
pub fn update_counters(
&self,
namespace: impl Into<Namespace>,
values: &HashMap<String, String>,
delta: i64
) -> Result<(), LimitadorError>
[src]
&self,
namespace: impl Into<Namespace>,
values: &HashMap<String, String>,
delta: i64
) -> Result<(), LimitadorError>
pub fn check_rate_limited_and_update(
&self,
namespace: impl Into<Namespace>,
values: &HashMap<String, String>,
delta: i64
) -> Result<bool, LimitadorError>
[src]
&self,
namespace: impl Into<Namespace>,
values: &HashMap<String, String>,
delta: i64
) -> Result<bool, LimitadorError>
pub fn get_counters(
&self,
namespace: impl Into<Namespace>
) -> Result<HashSet<Counter>, LimitadorError>
[src]
&self,
namespace: impl Into<Namespace>
) -> Result<HashSet<Counter>, LimitadorError>
pub fn configure_with(
&self,
limits: impl IntoIterator<Item = Limit>
) -> Result<(), LimitadorError>
[src]
&self,
limits: impl IntoIterator<Item = Limit>
) -> Result<(), LimitadorError>
Trait Implementations
impl Default for RateLimiter
[src]
Auto Trait Implementations
impl !RefUnwindSafe for RateLimiter
impl Send for RateLimiter
impl Sync for RateLimiter
impl Unpin for RateLimiter
impl !UnwindSafe for RateLimiter
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,