Struct slog_atomic::AtomicSwitchCtrl
[−]
[src]
pub struct AtomicSwitchCtrl<E>(_);
Handle to AtomicSwitch
that controls it.
Methods
impl<E> AtomicSwitchCtrl<E>
[src]
fn get(&self) -> Arc<Box<Drain<Error=E> + Send + Sync>>
Get Arc to the currently wrapped drain
fn set<D: Drain<Error=E> + Send + Sync>(&self, drain: D)
Set the current wrapped drain
fn swap(&self,
drain: Arc<Box<Drain<Error=E> + Send + Sync>>)
-> Arc<Box<Drain<Error=E> + Send + Sync>>
drain: Arc<Box<Drain<Error=E> + Send + Sync>>)
-> Arc<Box<Drain<Error=E> + Send + Sync>>
Swap the existing drain with a new one
fn drain(&self) -> AtomicSwitch<E>
Get a AtomicSwitch
drain controlled by this AtomicSwitchCtrl