pub struct Builder { /* private fields */ }Available on crate feature
redis only.Implementations§
Source§impl Builder
impl Builder
Sourcepub fn key_prefix(self, key_prefix: Option<&str>) -> Self
pub fn key_prefix(self, key_prefix: Option<&str>) -> Self
Apply an optional prefix to all rate limit keys given to this backend.
This may be useful when the Redis instance is being used for other purposes; the prefix is used as a ‘namespace’ to avoid collision with other caches or keys inside Redis.
pub fn build(self) -> RedisBackend
Auto Trait Implementations§
impl Freeze for Builder
impl !RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl !UnwindSafe for Builder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more