pub struct CompositeLogBackend { /* private fields */ }Expand description
Thread-safe list of backends; also implements LogBackend by fan-out.
Implementations§
Source§impl CompositeLogBackend
impl CompositeLogBackend
Sourcepub fn new() -> Self
pub fn new() -> Self
Empty backend list; use Logger::add to register sinks.
Trait Implementations§
Source§impl Default for CompositeLogBackend
impl Default for CompositeLogBackend
Source§impl LogBackend for CompositeLogBackend
impl LogBackend for CompositeLogBackend
Source§impl Logger for CompositeLogBackend
impl Logger for CompositeLogBackend
Source§fn add(&self, backend: Arc<dyn LogBackend>) -> Result<(), EffectLoggerError>
fn add(&self, backend: Arc<dyn LogBackend>) -> Result<(), EffectLoggerError>
Append a backend to the ordered fan-out list.
Source§fn replace(
&self,
idx: usize,
backend: Arc<dyn LogBackend>,
) -> Result<(), EffectLoggerError>
fn replace( &self, idx: usize, backend: Arc<dyn LogBackend>, ) -> Result<(), EffectLoggerError>
Swap the backend at
idx without changing list length.Auto Trait Implementations§
impl !Freeze for CompositeLogBackend
impl RefUnwindSafe for CompositeLogBackend
impl Send for CompositeLogBackend
impl Sync for CompositeLogBackend
impl Unpin for CompositeLogBackend
impl UnsafeUnpin for CompositeLogBackend
impl UnwindSafe for CompositeLogBackend
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more