pub struct LimitKeyBuilder { /* private fields */ }Expand description
限流键构建器
从多个维度构建限流键,如 IP + 用户 + API。
Implementations§
Source§impl LimitKeyBuilder
impl LimitKeyBuilder
Sourcepub fn with_separator(self, sep: &str) -> Self
pub fn with_separator(self, sep: &str) -> Self
设置分隔符
Sourcepub fn part_count(&self) -> usize
pub fn part_count(&self) -> usize
部分数量
Trait Implementations§
Source§impl Clone for LimitKeyBuilder
impl Clone for LimitKeyBuilder
Source§fn clone(&self) -> LimitKeyBuilder
fn clone(&self) -> LimitKeyBuilder
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LimitKeyBuilder
impl Debug for LimitKeyBuilder
Auto Trait Implementations§
impl Freeze for LimitKeyBuilder
impl RefUnwindSafe for LimitKeyBuilder
impl Send for LimitKeyBuilder
impl Sync for LimitKeyBuilder
impl Unpin for LimitKeyBuilder
impl UnsafeUnpin for LimitKeyBuilder
impl UnwindSafe for LimitKeyBuilder
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