pub struct FanOutLoggingPlugin { /* private fields */ }Expand description
Fan-out adapter — broadcasts an event to all registered
backends. Useful for a setup with stderr + an audit JSON file
in parallel.
Implementations§
Source§impl FanOutLoggingPlugin
impl FanOutLoggingPlugin
Sourcepub fn with<P: LoggingPlugin + 'static>(self, sink: P) -> Self
pub fn with<P: LoggingPlugin + 'static>(self, sink: P) -> Self
Add a backend. Builder style.
Sourcepub fn with_boxed(self, sink: Box<dyn LoggingPlugin>) -> Self
pub fn with_boxed(self, sink: Box<dyn LoggingPlugin>) -> Self
Add a backend via Box<dyn ...> (when the user already has a
boxed sink).
Sourcepub fn sink_count(&self) -> usize
pub fn sink_count(&self) -> usize
Number of registered backends.
Trait Implementations§
Source§impl Default for FanOutLoggingPlugin
impl Default for FanOutLoggingPlugin
Source§impl LoggingPlugin for FanOutLoggingPlugin
impl LoggingPlugin for FanOutLoggingPlugin
Auto Trait Implementations§
impl !RefUnwindSafe for FanOutLoggingPlugin
impl !UnwindSafe for FanOutLoggingPlugin
impl Freeze for FanOutLoggingPlugin
impl Send for FanOutLoggingPlugin
impl Sync for FanOutLoggingPlugin
impl Unpin for FanOutLoggingPlugin
impl UnsafeUnpin for FanOutLoggingPlugin
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