pub struct TimeBasedWindowConfig {
pub sliding_window_duration: Duration,
pub sliding_window_size: usize,
}Expand description
TimeBased 滑动窗口专有配置。
仅在 WindowConfig::TimeBased 时生效。
Fields§
§sliding_window_duration: Duration滑动窗口时间跨度。默认: 45s
sliding_window_size: usize最大跟踪调用数(影响 minimum_number_of_calls 默认值)。默认: 20
Trait Implementations§
Source§impl Clone for TimeBasedWindowConfig
impl Clone for TimeBasedWindowConfig
Source§fn clone(&self) -> TimeBasedWindowConfig
fn clone(&self) -> TimeBasedWindowConfig
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 TimeBasedWindowConfig
impl Debug for TimeBasedWindowConfig
Source§impl Default for TimeBasedWindowConfig
impl Default for TimeBasedWindowConfig
Source§impl From<TimeBasedWindowConfig> for WindowConfig
impl From<TimeBasedWindowConfig> for WindowConfig
Source§fn from(cfg: TimeBasedWindowConfig) -> Self
fn from(cfg: TimeBasedWindowConfig) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for TimeBasedWindowConfig
impl RefUnwindSafe for TimeBasedWindowConfig
impl Send for TimeBasedWindowConfig
impl Sync for TimeBasedWindowConfig
impl Unpin for TimeBasedWindowConfig
impl UnsafeUnpin for TimeBasedWindowConfig
impl UnwindSafe for TimeBasedWindowConfig
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