pub struct FnSink<F: FnMut(Event) + Send>(pub F);Expand description
Forwards each event to a closure — e.g. a JSONL stdout writer for stream-json,
or a Vec-pushing closure in tests.
Tuple Fields§
§0: FTrait Implementations§
Auto Trait Implementations§
impl<F> Freeze for FnSink<F>where
F: Freeze,
impl<F> RefUnwindSafe for FnSink<F>where
F: RefUnwindSafe,
impl<F> Send for FnSink<F>
impl<F> Sync for FnSink<F>where
F: Sync,
impl<F> Unpin for FnSink<F>where
F: Unpin,
impl<F> UnsafeUnpin for FnSink<F>where
F: UnsafeUnpin,
impl<F> UnwindSafe for FnSink<F>where
F: UnwindSafe,
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