Trait SimpleBackend

Source
pub trait SimpleBackend: Backend<SimpleInput, Output = SimpleOutput> {
    // Required method
    fn remove_key(
        &self,
        key: &str,
    ) -> impl Future<Output = Result<(), Self::Error>>;
}
Expand description

Additional functions for a Backend that uses SimpleInput and SimpleOutput.

Required Methods§

Source

fn remove_key(&self, key: &str) -> impl Future<Output = Result<(), Self::Error>>

Removes the bucket for a given rate limit key.

Intended to be used to reset a key before changing the interval.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§