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>>>
Get Arc to the currently wrapped drain
fn set<D: Drain<Error=E>>(&self, drain: D)
Set the current wrapped drain
fn swap(&self, drain: Arc<Box<Drain<Error=E>>>) -> Arc<Box<Drain<Error=E>>>
Swap the existing drain with a new one
fn drain(&self) -> AtomicSwitch<E>
Get a AtomicSwitch
drain controlled by this AtomicSwitchCtrl