pub struct InspectLineSink<F> { /* private fields */ }Expand description
LineSink wrapping a per-line closure. Compose with
LineAdapter to drive inspect_lines, or to
build your own custom inspect-lines consumer outside the built-in factory methods.
Implementations§
Trait Implementations§
Source§impl<F> LineSink for InspectLineSink<F>
impl<F> LineSink for InspectLineSink<F>
Source§type Output = ()
type Output = ()
Final value produced once the adapter is finished. Returned via
Consumer::wait.Source§fn on_line(&mut self, line: Cow<'_, str>) -> Next
fn on_line(&mut self, line: Cow<'_, str>) -> Next
Invoked for every parsed line. Return
Next::Break to stop further parsing.Source§fn into_output(self) -> Self::Output
fn into_output(self) -> Self::Output
Consumes the sink and returns its final output.
Auto Trait Implementations§
impl<F> Freeze for InspectLineSink<F>where
F: Freeze,
impl<F> RefUnwindSafe for InspectLineSink<F>where
F: RefUnwindSafe,
impl<F> Send for InspectLineSink<F>where
F: Send,
impl<F> Sync for InspectLineSink<F>where
F: Sync,
impl<F> Unpin for InspectLineSink<F>where
F: Unpin,
impl<F> UnsafeUnpin for InspectLineSink<F>where
F: UnsafeUnpin,
impl<F> UnwindSafe for InspectLineSink<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