Struct slog_async::AsyncBuilder
source · pub struct AsyncBuilder<D>where
D: Drain<Err = Never, Ok = ()> + Send + 'static,{ /* private fields */ }
Expand description
Async
builder
Implementations§
source§impl<D> AsyncBuilder<D>where
D: Drain<Err = Never, Ok = ()> + Send + 'static,
impl<D> AsyncBuilder<D>where D: Drain<Err = Never, Ok = ()> + Send + 'static,
sourcepub fn chan_size(self, s: usize) -> Self
pub fn chan_size(self, s: usize) -> Self
Set channel size used to send logging records to worker thread. When
buffer is full AsyncCore
will start returning AsyncError::Full
.
sourcepub fn overflow_strategy(self, overflow_strategy: OverflowStrategy) -> Self
pub fn overflow_strategy(self, overflow_strategy: OverflowStrategy) -> Self
Sets what will happen if the channel is full.
sourcepub fn thread_name(self, name: String) -> Self
pub fn thread_name(self, name: String) -> Self
Configure a name to be used for the background thread.
The name must not contain ‘\0’.
Panics
If a name with ‘\0’ is passed.
sourcepub fn build_no_guard(self) -> Async
pub fn build_no_guard(self) -> Async
Complete building Async
sourcepub fn build_with_guard(self) -> (Async, AsyncGuard)
pub fn build_with_guard(self) -> (Async, AsyncGuard)
Complete building Async
with AsyncGuard
See AsyncGuard
for more information.
Auto Trait Implementations§
impl<D> RefUnwindSafe for AsyncBuilder<D>where D: RefUnwindSafe,
impl<D> Send for AsyncBuilder<D>
impl<D> Sync for AsyncBuilder<D>where D: Sync,
impl<D> Unpin for AsyncBuilder<D>where D: Unpin,
impl<D> UnwindSafe for AsyncBuilder<D>where D: 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