pub struct BatcherBuilder<P: Processor, I1, S: State = Empty>{ /* private fields */ }Expand description
Use builder syntax to set the inputs and finish with build().
Implementations§
Source§impl<P: Processor, I1, S: State> BatcherBuilder<P, I1, S>
impl<P: Processor, I1, S: State> BatcherBuilder<P, I1, S>
Sourcepub fn build(self) -> Batcher<P>where
S: IsComplete,
pub fn build(self) -> Batcher<P>where
S: IsComplete,
Finishes building and performs the requested action.
Sourcepub fn name(self, value: I1) -> BatcherBuilder<P, I1, SetName<S>>where
S::Name: IsUnset,
pub fn name(self, value: I1) -> BatcherBuilder<P, I1, SetName<S>>where
S::Name: IsUnset,
Required.
Identifies the batcher in tracing spans and logs, and is passed to the
MetricsRecorderFactory.
Sourcepub fn processor(self, value: P) -> BatcherBuilder<P, I1, SetProcessor<S>>where
S::Processor: IsUnset,
pub fn processor(self, value: P) -> BatcherBuilder<P, I1, SetProcessor<S>>where
S::Processor: IsUnset,
Required.
Sourcepub fn limits(self, value: Limits) -> BatcherBuilder<P, I1, SetLimits<S>>where
S::Limits: IsUnset,
pub fn limits(self, value: Limits) -> BatcherBuilder<P, I1, SetLimits<S>>where
S::Limits: IsUnset,
Required.
Sourcepub fn batching_policy(
self,
value: BatchingPolicy,
) -> BatcherBuilder<P, I1, SetBatchingPolicy<S>>where
S::BatchingPolicy: IsUnset,
pub fn batching_policy(
self,
value: BatchingPolicy,
) -> BatcherBuilder<P, I1, SetBatchingPolicy<S>>where
S::BatchingPolicy: IsUnset,
Required.
Sourcepub fn metrics(
self,
value: Box<dyn MetricsRecorderFactory>,
) -> BatcherBuilder<P, I1, SetMetrics<S>>where
S::Metrics: IsUnset,
pub fn metrics(
self,
value: Box<dyn MetricsRecorderFactory>,
) -> BatcherBuilder<P, I1, SetMetrics<S>>where
S::Metrics: IsUnset,
Optional (Some / Option setters).
Creates the batcher’s MetricsRecorder. Without it, no
metrics are recorded.
Sourcepub fn maybe_metrics(
self,
value: Option<Box<dyn MetricsRecorderFactory>>,
) -> BatcherBuilder<P, I1, SetMetrics<S>>where
S::Metrics: IsUnset,
pub fn maybe_metrics(
self,
value: Option<Box<dyn MetricsRecorderFactory>>,
) -> BatcherBuilder<P, I1, SetMetrics<S>>where
S::Metrics: IsUnset,
Optional (Some / Option setters).
Creates the batcher’s MetricsRecorder. Without it, no
metrics are recorded.
Auto Trait Implementations§
impl<P, I1, S = Empty> !RefUnwindSafe for BatcherBuilder<P, I1, S>
impl<P, I1, S = Empty> !UnwindSafe for BatcherBuilder<P, I1, S>
impl<P, I1, S> Forget for BatcherBuilder<P, I1, S>
impl<P, I1, S> Freeze for BatcherBuilder<P, I1, S>where
PhantomData<(fn() -> S, fn() -> PhantomData<Batcher<P>>, fn() -> PhantomData<P>, fn() -> PhantomData<I1>)>: Freeze,
(Option<I1>, Option<P>, Option<Limits>, Option<BatchingPolicy>, Option<Box<dyn MetricsRecorderFactory>>): Freeze,
impl<P, I1, S> Send for BatcherBuilder<P, I1, S>where
PhantomData<(fn() -> S, fn() -> PhantomData<Batcher<P>>, fn() -> PhantomData<P>, fn() -> PhantomData<I1>)>: Send,
(Option<I1>, Option<P>, Option<Limits>, Option<BatchingPolicy>, Option<Box<dyn MetricsRecorderFactory>>): Send,
impl<P, I1, S> Sync for BatcherBuilder<P, I1, S>where
PhantomData<(fn() -> S, fn() -> PhantomData<Batcher<P>>, fn() -> PhantomData<P>, fn() -> PhantomData<I1>)>: Sync,
(Option<I1>, Option<P>, Option<Limits>, Option<BatchingPolicy>, Option<Box<dyn MetricsRecorderFactory>>): Sync,
impl<P, I1, S> Unpin for BatcherBuilder<P, I1, S>where
PhantomData<(fn() -> S, fn() -> PhantomData<Batcher<P>>, fn() -> PhantomData<P>, fn() -> PhantomData<I1>)>: Unpin,
(Option<I1>, Option<P>, Option<Limits>, Option<BatchingPolicy>, Option<Box<dyn MetricsRecorderFactory>>): Unpin,
impl<P, I1, S> UnsafeUnpin for BatcherBuilder<P, I1, S>where
PhantomData<(fn() -> S, fn() -> PhantomData<Batcher<P>>, fn() -> PhantomData<P>, fn() -> PhantomData<I1>)>: UnsafeUnpin,
(Option<I1>, Option<P>, Option<Limits>, Option<BatchingPolicy>, Option<Box<dyn MetricsRecorderFactory>>): UnsafeUnpin,
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