Struct tracing_layer_core::BackgroundWorker
source · pub struct BackgroundWorker { /* private fields */ }
Expand description
This worker manages a background async task that schedules the network requests to send traces to the Discord on the running tokio runtime.
Ensure to invoke .startup()
before, and .teardown()
after, your application code runs. This
is required to ensure proper initialization and shutdown.
tracing-layer-discord
synchronously generates payloads to send to the Discord API using the
tracing events from the global subscriber. However, all network requests are offloaded onto
an unbuffered channel and processed by a provided future acting as an asynchronous worker.
Implementations§
Trait Implementations§
source§impl Clone for BackgroundWorker
impl Clone for BackgroundWorker
source§fn clone(&self) -> BackgroundWorker
fn clone(&self) -> BackgroundWorker
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for BackgroundWorker
impl !RefUnwindSafe for BackgroundWorker
impl Send for BackgroundWorker
impl Sync for BackgroundWorker
impl Unpin for BackgroundWorker
impl !UnwindSafe for BackgroundWorker
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