pub struct CollectLineSinkAsync<T, C> { /* private fields */ }Expand description
AsyncLineSink holding the user collector and a sink. Compose with
LineAdapter (its AsyncStreamVisitor impl
is selected automatically when the inner sink is an AsyncLineSink) to drive
collect_lines_async.
Implementations§
Source§impl<T, C> CollectLineSinkAsync<T, C>where
T: Sink,
C: AsyncLineCollector<T>,
impl<T, C> CollectLineSinkAsync<T, C>where
T: Sink,
C: AsyncLineCollector<T>,
Trait Implementations§
Source§impl<T, C> AsyncLineSink for CollectLineSinkAsync<T, C>where
T: Sink,
C: AsyncLineCollector<T>,
impl<T, C> AsyncLineSink for CollectLineSinkAsync<T, C>where
T: Sink,
C: AsyncLineCollector<T>,
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<T, C> Freeze for CollectLineSinkAsync<T, C>
impl<T, C> RefUnwindSafe for CollectLineSinkAsync<T, C>where
T: RefUnwindSafe,
C: RefUnwindSafe,
impl<T, C> Send for CollectLineSinkAsync<T, C>
impl<T, C> Sync for CollectLineSinkAsync<T, C>
impl<T, C> Unpin for CollectLineSinkAsync<T, C>
impl<T, C> UnsafeUnpin for CollectLineSinkAsync<T, C>where
T: UnsafeUnpin,
C: UnsafeUnpin,
impl<T, C> UnwindSafe for CollectLineSinkAsync<T, C>where
T: UnwindSafe,
C: 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