pub struct InspectLineSinkAsync<F, Fut> { /* private fields */ }Expand description
AsyncLineSink wrapping a per-line async closure. Compose with
LineAdapter (its AsyncStreamVisitor impl
is selected automatically when the inner sink is an AsyncLineSink) to drive
inspect_lines_async. The PhantomData<fn() -> Fut> carries the future’s type onto the
struct so callers never name Fut explicitly.
Implementations§
Trait Implementations§
Source§impl<F, Fut> AsyncLineSink for InspectLineSinkAsync<F, Fut>
impl<F, Fut> AsyncLineSink for InspectLineSinkAsync<F, Fut>
Source§fn on_line<'a>(
&'a mut self,
line: Cow<'a, str>,
) -> impl Future<Output = Next> + Send + 'a
fn on_line<'a>( &'a mut self, line: Cow<'a, str>, ) -> impl Future<Output = Next> + Send + 'a
Asynchronously observes a single 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.
Source§fn on_gap(&mut self)
fn on_gap(&mut self)
Synchronous gap hook; default no-op. See
LineSink::on_gap.Auto Trait Implementations§
impl<F, Fut> Freeze for InspectLineSinkAsync<F, Fut>where
F: Freeze,
impl<F, Fut> RefUnwindSafe for InspectLineSinkAsync<F, Fut>where
F: RefUnwindSafe,
impl<F, Fut> Send for InspectLineSinkAsync<F, Fut>where
F: Send,
impl<F, Fut> Sync for InspectLineSinkAsync<F, Fut>where
F: Sync,
impl<F, Fut> Unpin for InspectLineSinkAsync<F, Fut>where
F: Unpin,
impl<F, Fut> UnsafeUnpin for InspectLineSinkAsync<F, Fut>where
F: UnsafeUnpin,
impl<F, Fut> UnwindSafe for InspectLineSinkAsync<F, Fut>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