Struct spdlog::sink::AsyncPoolSinkBuilder
source · pub struct AsyncPoolSinkBuilder { /* private fields */ }
Available on crate feature
multi-thread
only.Expand description
The builder of AsyncPoolSink
.
Implementations
sourceimpl AsyncPoolSinkBuilder
impl AsyncPoolSinkBuilder
sourcepub fn sinks<I>(self, sinks: I) -> Selfwhere
I: IntoIterator<Item = Arc<dyn Sink>>,
pub fn sinks<I>(self, sinks: I) -> Selfwhere
I: IntoIterator<Item = Arc<dyn Sink>>,
Add multiple Sink
s.
sourcepub fn overflow_policy(self, overflow_policy: OverflowPolicy) -> Self
pub fn overflow_policy(self, overflow_policy: OverflowPolicy) -> Self
Specifies a overflow policy.
This parameter is optional, and defaults to
OverflowPolicy::Block
.
For more details, see the documentation of OverflowPolicy
.
sourcepub fn thread_pool(self, thread_pool: Arc<ThreadPool>) -> Self
pub fn thread_pool(self, thread_pool: Arc<ThreadPool>) -> Self
Specifies a custom thread pool.
This parameter is optional, and defaults to the built-in thread pool.
For more details, see the documentation of AsyncPoolSinkBuilder
.
sourcepub fn build(self) -> Result<AsyncPoolSink>
pub fn build(self) -> Result<AsyncPoolSink>
Builds a AsyncPoolSink
.
sourcepub fn level_filter(self, level_filter: LevelFilter) -> Self
pub fn level_filter(self, level_filter: LevelFilter) -> Self
Specifies a log level filter.
This parameter is optional, and defaults to LevelFilter::All
.
sourcepub fn error_handler(self, handler: ErrorHandler) -> Self
pub fn error_handler(self, handler: ErrorHandler) -> Self
Specifies an error handler.
This parameter is optional, and defaults no handler, see Sink::set_error_handler
for details.
Auto Trait Implementations
impl !RefUnwindSafe for AsyncPoolSinkBuilder
impl Send for AsyncPoolSinkBuilder
impl Sync for AsyncPoolSinkBuilder
impl Unpin for AsyncPoolSinkBuilder
impl !UnwindSafe for AsyncPoolSinkBuilder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more