pub struct WriterSink<W: Write + Send, F: Format> { /* private fields */ }Available on crate feature
std only.Expand description
Adapter that turns any Send + Write value into a Sink.
Useful for piping records to in-memory buffers, sockets, or other non-file destinations. Wraps the writer in a mutex so the sink is safe to share across threads.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<W, F> !Freeze for WriterSink<W, F>
impl<W, F> RefUnwindSafe for WriterSink<W, F>where
F: RefUnwindSafe,
impl<W, F> Send for WriterSink<W, F>
impl<W, F> Sync for WriterSink<W, F>
impl<W, F> Unpin for WriterSink<W, F>
impl<W, F> UnsafeUnpin for WriterSink<W, F>where
F: UnsafeUnpin,
W: UnsafeUnpin,
impl<W, F> UnwindSafe for WriterSink<W, 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