pub struct ConfiguredFixedWindowCounterBuilder<P: Precision, T: TimeSource> { /* private fields */ }Expand description
Fully configured builder for FixedWindowCounter with precision and time source set.
This builder is created after calling with_precision() and is ready to build
the final FixedWindowCounter instance.
Implementations§
Source§impl<P: Precision, T: TimeSource> ConfiguredFixedWindowCounterBuilder<P, T>
impl<P: Precision, T: TimeSource> ConfiguredFixedWindowCounterBuilder<P, T>
Sourcepub fn build(self) -> BuildResult<FixedWindowCounter<P, T>>
pub fn build(self) -> BuildResult<FixedWindowCounter<P, T>>
Builds the FixedWindowCounter with the configured parameters.
All required configuration must be provided before calling this method. This method also validates that all parameter values are valid.
§Returns
Ok(FixedWindowCounter)- Successfully created fixed window counterErr(BuildError)- Missing required configuration or invalid parameter values
§Errors
Returns BuildError if:
- Any required configuration is missing
- Any parameter has an invalid value (e.g., capacity = 0)
Trait Implementations§
Auto Trait Implementations§
impl<P, T> Freeze for ConfiguredFixedWindowCounterBuilder<P, T>where
T: Freeze,
impl<P, T> RefUnwindSafe for ConfiguredFixedWindowCounterBuilder<P, T>where
T: RefUnwindSafe,
P: RefUnwindSafe,
impl<P, T> Send for ConfiguredFixedWindowCounterBuilder<P, T>
impl<P, T> Sync for ConfiguredFixedWindowCounterBuilder<P, T>
impl<P, T> Unpin for ConfiguredFixedWindowCounterBuilder<P, T>
impl<P, T> UnwindSafe for ConfiguredFixedWindowCounterBuilder<P, T>where
T: UnwindSafe,
P: UnwindSafe,
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