Struct slog_atomic::AtomicSwitchCtrl
[−]
[src]
pub struct AtomicSwitchCtrl<E>(_);
Handle to AtomicSwitch
allowing switching it's sub-drain
Methods
impl<E> AtomicSwitchCtrl<E>
[src]
fn new<D: Drain<Error=E> + 'static>(d: D) -> Self
Create new AtomicSwitchCtrl
fn new_from_arc(d: Arc<ArcCell<Box<Drain<Error=E>>>>) -> Self
Create new AtomicSwitchCtrl
from an existing Arc<...>
fn drain(&self) -> AtomicSwitch<E>
Get a AtomicSwitch
drain controlled by this AtomicSwitchCtrl
fn set<D: Drain<Error=E>>(&self, drain: D)
Set the drain
fn swap(&self, drain: Arc<Box<Drain<Error=E>>>) -> Arc<Box<Drain<Error=E>>>
Swap the existing drain with a new one