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