pub struct CompatStream<T>(_);
Expand description

Compact tokio to future

Implementations§

New wrapped stream

Get a reference to the Future, Stream, AsyncRead, or AsyncWrite object contained within.

Get a mutable reference to the Future, Stream, AsyncRead, or AsyncWrite object contained within.

Returns the wrapped item.

Trait Implementations§

Attempt to read from the AsyncRead into buf. Read more
Attempt to read from the AsyncRead into bufs using vectored IO operations. Read more
Attempts to read from the AsyncRead into buf. Read more
Attempt to write bytes from buf into the object. Read more
Attempt to flush the object, ensuring that any buffered data reach their destination. Read more
Attempt to close the object. Read more
Attempt to write bytes from bufs into the object using vectored IO operations. Read more
Attempt to write bytes from buf into the object. Read more
Attempts to flush the object, ensuring that any buffered data reach their destination. Read more
Initiates or attempts to shut down this writer, returning success when the I/O connection has completely shut down. Read more
Like poll_write, except that it writes from a slice of buffers. Read more
Determines if this writer has an efficient poll_write_vectored implementation. Read more
Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Creates an adaptor which will chain this stream with another. Read more
Tries to read some bytes directly into the given buf in asynchronous manner, returning a future type. Read more
Creates a future which will read from the AsyncRead into bufs using vectored IO operations. Read more
Creates a future which will read exactly enough bytes to fill buf, returning an error if end of file (EOF) is hit sooner. Read more
Creates a future which will read all the bytes from this AsyncRead. Read more
Creates a future which will read all the bytes from this AsyncRead. Read more
Helper method for splitting this read/write object into two halves. Read more
Creates an AsyncRead adapter which will read at most limit bytes from the underlying reader. Read more
Creates a new AsyncRead instance that chains this stream with next. Read more
Pulls some bytes from this source into the specified buffer, returning how many bytes were read. Read more
Pulls some bytes from this source into the specified buffer, advancing the buffer’s internal cursor. Read more
Reads the exact number of bytes required to fill buf. Read more
Reads an unsigned 8 bit integer from the underlying reader. Read more
Reads a signed 8 bit integer from the underlying reader. Read more
Reads an unsigned 16-bit integer in big-endian order from the underlying reader. Read more
Reads a signed 16-bit integer in big-endian order from the underlying reader. Read more
Reads an unsigned 32-bit integer in big-endian order from the underlying reader. Read more
Reads a signed 32-bit integer in big-endian order from the underlying reader. Read more
Reads an unsigned 64-bit integer in big-endian order from the underlying reader. Read more
Reads an signed 64-bit integer in big-endian order from the underlying reader. Read more
Reads an unsigned 128-bit integer in big-endian order from the underlying reader. Read more
Reads an signed 128-bit integer in big-endian order from the underlying reader. Read more
Reads an 32-bit floating point type in big-endian order from the underlying reader. Read more
Reads an 64-bit floating point type in big-endian order from the underlying reader. Read more
Reads an unsigned 16-bit integer in little-endian order from the underlying reader. Read more
Reads a signed 16-bit integer in little-endian order from the underlying reader. Read more
Reads an unsigned 32-bit integer in little-endian order from the underlying reader. Read more
Reads a signed 32-bit integer in little-endian order from the underlying reader. Read more
Reads an unsigned 64-bit integer in little-endian order from the underlying reader. Read more
Reads an signed 64-bit integer in little-endian order from the underlying reader. Read more
Reads an unsigned 128-bit integer in little-endian order from the underlying reader. Read more
Reads an signed 128-bit integer in little-endian order from the underlying reader. Read more
Reads an 32-bit floating point type in little-endian order from the underlying reader. Read more
Reads an 64-bit floating point type in little-endian order from the underlying reader. Read more
Reads all bytes until EOF in this source, placing them into buf. Read more
Reads all bytes until EOF in this source, appending them to buf. Read more
Creates an adaptor which reads at most limit bytes from it. Read more
Creates a future which will entirely flush this AsyncWrite. Read more
Creates a future which will entirely close this AsyncWrite.
Creates a future which will write bytes from buf into the object. Read more
Creates a future which will write bytes from bufs into the object using vectored IO operations. Read more
Write data into this object. Read more
Available on crate feature sink only.
Allow using an [AsyncWrite] as a Sink<Item: AsRef<[u8]>>. Read more
Writes a buffer into this writer, returning how many bytes were written. Read more
Like write, except that it writes from a slice of buffers. Read more
Writes a buffer into this writer, advancing the buffer’s internal cursor. Read more
Attempts to write an entire buffer into this writer. Read more
Attempts to write an entire buffer into this writer. Read more
Writes an unsigned 8-bit integer to the underlying writer. Read more
Writes a signed 8-bit integer to the underlying writer. Read more
Writes an unsigned 16-bit integer in big-endian order to the underlying writer. Read more
Writes a signed 16-bit integer in big-endian order to the underlying writer. Read more
Writes an unsigned 32-bit integer in big-endian order to the underlying writer. Read more
Writes a signed 32-bit integer in big-endian order to the underlying writer. Read more
Writes an unsigned 64-bit integer in big-endian order to the underlying writer. Read more
Writes an signed 64-bit integer in big-endian order to the underlying writer. Read more
Writes an unsigned 128-bit integer in big-endian order to the underlying writer. Read more
Writes an signed 128-bit integer in big-endian order to the underlying writer. Read more
Writes an 32-bit floating point type in big-endian order to the underlying writer. Read more
Writes an 64-bit floating point type in big-endian order to the underlying writer. Read more
Writes an unsigned 16-bit integer in little-endian order to the underlying writer. Read more
Writes a signed 16-bit integer in little-endian order to the underlying writer. Read more
Writes an unsigned 32-bit integer in little-endian order to the underlying writer. Read more
Writes a signed 32-bit integer in little-endian order to the underlying writer. Read more
Writes an unsigned 64-bit integer in little-endian order to the underlying writer. Read more
Writes an signed 64-bit integer in little-endian order to the underlying writer. Read more
Writes an unsigned 128-bit integer in little-endian order to the underlying writer. Read more
Writes an signed 128-bit integer in little-endian order to the underlying writer. Read more
Writes an 32-bit floating point type in little-endian order to the underlying writer. Read more
Writes an 64-bit floating point type in little-endian order to the underlying writer. Read more
Flushes this output stream, ensuring that all intermediately buffered contents reach their destination. Read more
Shuts down the output stream, ensuring that the value can be dropped cleanly. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more