Struct InspectWriter
struct InspectWriter<W, F> { ... }
An adapter that lets you inspect the data that's being written.
This is useful for things like hashing data as it's written out.
Implementations
impl<W, F> InspectWriter<W, F>
fn new(writer: W, f: F) -> InspectWriter<W, F> where W: AsyncWrite, F: FnMut(&[u8])Create a new
InspectWriter, wrappingwriteand callingffor the data successfully written by each write call.The closure
fwill never be called with an empty slice. A vectored write can result in multiple calls tof- at most one call tofper buffer supplied topoll_write_vectored.fn into_inner(self: Self) -> WConsumes the
InspectWriter, returning the wrapped writer
impl<'__pin, W, F> Unpin for InspectWriter<W, F>
impl<R> AsyncReadExt for InspectWriter<W, F>
impl<T> Any for InspectWriter<W, F>
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for InspectWriter<W, F>
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for InspectWriter<W, F>
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> From for InspectWriter<W, F>
fn from(t: T) -> TReturns the argument unchanged.
impl<T, U> Into for InspectWriter<W, F>
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for InspectWriter<W, F>
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for InspectWriter<W, F>
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>
impl<W> AsyncWriteExt for InspectWriter<W, F>
impl<W, F> Freeze for InspectWriter<W, F>
impl<W, F> RefUnwindSafe for InspectWriter<W, F>
impl<W, F> Send for InspectWriter<W, F>
impl<W, F> Sync for InspectWriter<W, F>
impl<W, F> UnsafeUnpin for InspectWriter<W, F>
impl<W, F> UnwindSafe for InspectWriter<W, F>
impl<W: AsyncRead, F> AsyncRead for InspectWriter<W, F>
fn poll_read(self: Pin<&mut Self>, cx: &mut Context<'_>, buf: &mut ReadBuf<'_>) -> Poll<Result<()>>
impl<W: AsyncWrite, F: FnMut(&[u8])> AsyncWrite for InspectWriter<W, F>
fn poll_write(self: Pin<&mut Self>, cx: &mut Context<'_>, buf: &[u8]) -> Poll<Result<usize>>fn poll_flush(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<()>>fn poll_shutdown(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<()>>fn poll_write_vectored(self: Pin<&mut Self>, cx: &mut Context<'_>, bufs: &[IoSlice<'_>]) -> Poll<Result<usize>>fn is_write_vectored(self: &Self) -> bool