pub struct ProcessedBloopSinkBuilder<R: BloopRepository> { /* private fields */ }Expand description
Builder for constructing a ProcessedBloopSink.
Implementations§
Source§impl<R: BloopRepository> ProcessedBloopSinkBuilder<R>
impl<R: BloopRepository> ProcessedBloopSinkBuilder<R>
Sourcepub fn repository(self, repository: R) -> Self
pub fn repository(self, repository: R) -> Self
Sets the repository used by the sink.
Sourcepub fn max_batch_size(self, size: usize) -> Self
pub fn max_batch_size(self, size: usize) -> Self
Sets the maximum number of bloops to buffer before flushing.
Sourcepub fn max_batch_duration(self, duration: Duration) -> Self
pub fn max_batch_duration(self, duration: Duration) -> Self
Sets the maximum duration to wait before flushing the buffered bloops.
Sourcepub fn event_rx(self, event_rx: Receiver<Event>) -> Self
pub fn event_rx(self, event_rx: Receiver<Event>) -> Self
Sets the event receiver from which bloops are received.
Sourcepub fn build(self) -> Result<ProcessedBloopSink<R>, BuilderError>
pub fn build(self) -> Result<ProcessedBloopSink<R>, BuilderError>
Attempts to build the sink, returning an error if any required fields are missing.
Trait Implementations§
Source§impl<R: Debug + BloopRepository> Debug for ProcessedBloopSinkBuilder<R>
impl<R: Debug + BloopRepository> Debug for ProcessedBloopSinkBuilder<R>
Source§impl<R: Default + BloopRepository> Default for ProcessedBloopSinkBuilder<R>
impl<R: Default + BloopRepository> Default for ProcessedBloopSinkBuilder<R>
Source§fn default() -> ProcessedBloopSinkBuilder<R>
fn default() -> ProcessedBloopSinkBuilder<R>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<R> Freeze for ProcessedBloopSinkBuilder<R>where
R: Freeze,
impl<R> RefUnwindSafe for ProcessedBloopSinkBuilder<R>where
R: RefUnwindSafe,
impl<R> Send for ProcessedBloopSinkBuilder<R>where
R: Send,
impl<R> Sync for ProcessedBloopSinkBuilder<R>where
R: Sync,
impl<R> Unpin for ProcessedBloopSinkBuilder<R>where
R: Unpin,
impl<R> UnwindSafe for ProcessedBloopSinkBuilder<R>where
R: UnwindSafe,
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Erasable for T
impl<T> Erasable for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more