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