pub struct WriteSink<W>(pub W);Expand description
Adapts any std::io::Write to a BatchSink, mapping a whole batch to one
write_all. Lives here (behind std) rather than in each consumer: BatchSink
is defined in this crate, so implementing it for a wrapper is allowed — the
orphan rule only blocks a third crate from writing this impl. Std consumers
(a telemetry terminal sink, a socket sink, …) wrap their writer in
WriteSink instead of re-deriving the bridge.
Tuple Fields§
§0: WTrait Implementations§
Auto Trait Implementations§
impl<W> Freeze for WriteSink<W>where
W: Freeze,
impl<W> RefUnwindSafe for WriteSink<W>where
W: RefUnwindSafe,
impl<W> Send for WriteSink<W>where
W: Send,
impl<W> Sync for WriteSink<W>where
W: Sync,
impl<W> Unpin for WriteSink<W>where
W: Unpin,
impl<W> UnsafeUnpin for WriteSink<W>where
W: UnsafeUnpin,
impl<W> UnwindSafe for WriteSink<W>where
W: 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