pub struct AsyncCoreBuilder<D>where
    D: Drain<Err = Never, Ok = ()> + Send + 'static,{ /* private fields */ }
Expand description

AsyncCore builder

Implementations§

source§

impl<D> AsyncCoreBuilder<D>where D: Drain<Err = Never, Ok = ()> + Send + 'static,

source

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.

source

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 or block, depending on the blocking configuration.

source

pub fn blocking(self, blocking: bool) -> Self

Should the logging call be blocking if the channel is full?

Default is false, in which case it’ll return AsyncError::Full.

source

pub fn build(self) -> AsyncCore

Build AsyncCore

source

pub fn build_no_guard(self) -> AsyncCore

Build AsyncCore

source

pub fn build_with_guard(self) -> (AsyncCore, AsyncGuard)

Build AsyncCore with AsyncGuard

See AsyncGuard for more information.

Auto Trait Implementations§

§

impl<D> RefUnwindSafe for AsyncCoreBuilder<D>where D: RefUnwindSafe,

§

impl<D> Send for AsyncCoreBuilder<D>

§

impl<D> Sync for AsyncCoreBuilder<D>where D: Sync,

§

impl<D> Unpin for AsyncCoreBuilder<D>where D: Unpin,

§

impl<D> UnwindSafe for AsyncCoreBuilder<D>where D: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> SendSyncUnwindSafe for Twhere T: Send + Sync + UnwindSafe + ?Sized,