pub struct InspectChunksAsync<F, Fut>{
pub f: F,
pub _fut: PhantomData<fn() -> Fut>,
}Expand description
Asynchronous counterpart to InspectChunks. Construct via builder and
pass to Consumable::consume_async.
Fields§
§f: FPer-chunk async callback. The returned future yields Next::Break to stop early.
_fut: PhantomData<fn() -> Fut>Phantom marker so the Fut bound lives on the struct (and on the derived builder)
rather than only on the impl block. The closure’s return type carries Fut, so the
builder infers it from f. Users never spell Fut out.
Implementations§
Source§impl<F, Fut> InspectChunksAsync<F, Fut>
impl<F, Fut> InspectChunksAsync<F, Fut>
Trait Implementations§
Source§impl<F, Fut> AsyncStreamVisitor for InspectChunksAsync<F, Fut>
impl<F, Fut> AsyncStreamVisitor for InspectChunksAsync<F, Fut>
Source§type Output = ()
type Output = ()
The value produced by
into_output after the visitor
has finished observing the stream. Returned via Consumer::wait
and Consumer::cancel.Source§fn on_chunk(&mut self, chunk: Chunk) -> impl Future<Output = Next> + Send + '_
fn on_chunk(&mut self, chunk: Chunk) -> impl Future<Output = Next> + Send + '_
Asynchronously observes a single chunk. Read more
Source§fn into_output(self) -> Self::Output
fn into_output(self) -> Self::Output
Consumes the visitor and returns its final output. Read more
Auto Trait Implementations§
impl<F, Fut> Freeze for InspectChunksAsync<F, Fut>where
F: Freeze,
impl<F, Fut> RefUnwindSafe for InspectChunksAsync<F, Fut>where
F: RefUnwindSafe,
impl<F, Fut> Send for InspectChunksAsync<F, Fut>
impl<F, Fut> Sync for InspectChunksAsync<F, Fut>where
F: Sync,
impl<F, Fut> Unpin for InspectChunksAsync<F, Fut>where
F: Unpin,
impl<F, Fut> UnsafeUnpin for InspectChunksAsync<F, Fut>where
F: UnsafeUnpin,
impl<F, Fut> UnwindSafe for InspectChunksAsync<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