Struct slog_atomic::AtomicSwitch
[−]
[src]
pub struct AtomicSwitch<E>(_);
Drain wrapping another drain, allowing atomic substitution in runtime
Methods
impl<E> AtomicSwitch<E>[src]
fn new<D: Drain<Error=E> + 'static + Send + Sync>(drain: D) -> Self
Wrap drain in AtomicSwitch to allow swapping it later
Use AtomicSwitch::ctrl() to get a handle to it
fn new_from_arc(d: Arc<ArcCell<Box<Drain<Error=E> + Send + Sync>>>) -> Self
Create new AtomicSwitch from an existing Arc<...>
See AtomicSwitch::new()
fn ctrl(&self) -> AtomicSwitchCtrl<E>
Get a AtomicSwitchCtrl handle to control this AtomicSwitch drain