Struct futures::io::AllowStdIo
source · [−]pub struct AllowStdIo<T>(_);
Expand description
A simple wrapper type which allows types which implement only
implement std::io::Read
or std::io::Write
to be used in contexts which expect an AsyncRead
or AsyncWrite
.
If these types issue an error with the kind io::ErrorKind::WouldBlock
,
it is expected that they will notify the current task on readiness.
Synchronous std
types should not issue errors of this kind and
are safe to use in this context. However, using these types with
AllowStdIo
will cause the event loop to block, so they should be used
with care.
Implementations
sourceimpl<T> AllowStdIo<T>
impl<T> AllowStdIo<T>
sourcepub fn new(io: T) -> AllowStdIo<T>ⓘNotable traits for AllowStdIo<T>impl<T> Read for AllowStdIo<T> where
T: Read, impl<T> Write for AllowStdIo<T> where
T: Write,
pub fn new(io: T) -> AllowStdIo<T>ⓘNotable traits for AllowStdIo<T>impl<T> Read for AllowStdIo<T> where
T: Read, impl<T> Write for AllowStdIo<T> where
T: Write,
T: Read, impl<T> Write for AllowStdIo<T> where
T: Write,
Creates a new AllowStdIo
from an existing IO object.
sourcepub fn into_inner(self) -> T
pub fn into_inner(self) -> T
Consumes self and returns the contained IO object.
Trait Implementations
sourceimpl<T> AsyncBufRead for AllowStdIo<T> where
T: BufRead,
impl<T> AsyncBufRead for AllowStdIo<T> where
T: BufRead,
sourceimpl<T> AsyncRead for AllowStdIo<T> where
T: Read,
impl<T> AsyncRead for AllowStdIo<T> where
T: Read,
sourcefn poll_read(
self: Pin<&mut AllowStdIo<T>>,
&mut Context<'_>,
buf: &mut [u8]
) -> Poll<Result<usize, Error>>
fn poll_read(
self: Pin<&mut AllowStdIo<T>>,
&mut Context<'_>,
buf: &mut [u8]
) -> Poll<Result<usize, Error>>
Attempt to read from the AsyncRead
into buf
. Read more
sourcefn poll_read_vectored(
self: Pin<&mut AllowStdIo<T>>,
&mut Context<'_>,
bufs: &mut [IoSliceMut<'_>]
) -> Poll<Result<usize, Error>>
fn poll_read_vectored(
self: Pin<&mut AllowStdIo<T>>,
&mut Context<'_>,
bufs: &mut [IoSliceMut<'_>]
) -> Poll<Result<usize, Error>>
Attempt to read from the AsyncRead
into bufs
using vectored
IO operations. Read more
sourceimpl<T> AsyncSeek for AllowStdIo<T> where
T: Seek,
impl<T> AsyncSeek for AllowStdIo<T> where
T: Seek,
sourceimpl<T> AsyncWrite for AllowStdIo<T> where
T: Write,
impl<T> AsyncWrite for AllowStdIo<T> where
T: Write,
sourcefn poll_write(
self: Pin<&mut AllowStdIo<T>>,
&mut Context<'_>,
buf: &[u8]
) -> Poll<Result<usize, Error>>
fn poll_write(
self: Pin<&mut AllowStdIo<T>>,
&mut Context<'_>,
buf: &[u8]
) -> Poll<Result<usize, Error>>
Attempt to write bytes from buf
into the object. Read more
sourcefn poll_write_vectored(
self: Pin<&mut AllowStdIo<T>>,
&mut Context<'_>,
bufs: &[IoSlice<'_>]
) -> Poll<Result<usize, Error>>
fn poll_write_vectored(
self: Pin<&mut AllowStdIo<T>>,
&mut Context<'_>,
bufs: &[IoSlice<'_>]
) -> Poll<Result<usize, Error>>
Attempt to write bytes from bufs
into the object using vectored
IO operations. Read more
sourcefn poll_flush(
self: Pin<&mut AllowStdIo<T>>,
&mut Context<'_>
) -> Poll<Result<(), Error>>
fn poll_flush(
self: Pin<&mut AllowStdIo<T>>,
&mut Context<'_>
) -> Poll<Result<(), Error>>
Attempt to flush the object, ensuring that any buffered data reach their destination. Read more
sourcefn poll_close(
self: Pin<&mut AllowStdIo<T>>,
cx: &mut Context<'_>
) -> Poll<Result<(), Error>>
fn poll_close(
self: Pin<&mut AllowStdIo<T>>,
cx: &mut Context<'_>
) -> Poll<Result<(), Error>>
Attempt to close the object. Read more
sourceimpl<T> BufRead for AllowStdIo<T> where
T: BufRead,
impl<T> BufRead for AllowStdIo<T> where
T: BufRead,
sourcefn fill_buf(&mut self) -> Result<&[u8], Error>
fn fill_buf(&mut self) -> Result<&[u8], Error>
Returns the contents of the internal buffer, filling it with more data from the inner reader if it is empty. Read more
sourcefn consume(&mut self, amt: usize)
fn consume(&mut self, amt: usize)
Tells this buffer that amt
bytes have been consumed from the buffer,
so they should no longer be returned in calls to read
. Read more
sourcefn has_data_left(&mut self) -> Result<bool, Error>
fn has_data_left(&mut self) -> Result<bool, Error>
buf_read_has_data_left
)Check if the underlying Read
has any data left to be read. Read more
1.0.0 · sourcefn read_until(
&mut self,
byte: u8,
buf: &mut Vec<u8, Global>
) -> Result<usize, Error>
fn read_until(
&mut self,
byte: u8,
buf: &mut Vec<u8, Global>
) -> Result<usize, Error>
Read all bytes into buf
until the delimiter byte
or EOF is reached. Read more
1.0.0 · sourcefn read_line(&mut self, buf: &mut String) -> Result<usize, Error>
fn read_line(&mut self, buf: &mut String) -> Result<usize, Error>
Read all bytes until a newline (the 0xA
byte) is reached, and append
them to the provided buffer. Read more
sourceimpl<T> Clone for AllowStdIo<T> where
T: Clone,
impl<T> Clone for AllowStdIo<T> where
T: Clone,
sourcefn clone(&self) -> AllowStdIo<T>ⓘNotable traits for AllowStdIo<T>impl<T> Read for AllowStdIo<T> where
T: Read, impl<T> Write for AllowStdIo<T> where
T: Write,
fn clone(&self) -> AllowStdIo<T>ⓘNotable traits for AllowStdIo<T>impl<T> Read for AllowStdIo<T> where
T: Read, impl<T> Write for AllowStdIo<T> where
T: Write,
T: Read, impl<T> Write for AllowStdIo<T> where
T: Write,
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<T> Debug for AllowStdIo<T> where
T: Debug,
impl<T> Debug for AllowStdIo<T> where
T: Debug,
sourceimpl<T> Hash for AllowStdIo<T> where
T: Hash,
impl<T> Hash for AllowStdIo<T> where
T: Hash,
sourceimpl<T> Ord for AllowStdIo<T> where
T: Ord,
impl<T> Ord for AllowStdIo<T> where
T: Ord,
sourceimpl<T> PartialEq<AllowStdIo<T>> for AllowStdIo<T> where
T: PartialEq<T>,
impl<T> PartialEq<AllowStdIo<T>> for AllowStdIo<T> where
T: PartialEq<T>,
sourcefn eq(&self, other: &AllowStdIo<T>) -> bool
fn eq(&self, other: &AllowStdIo<T>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &AllowStdIo<T>) -> bool
fn ne(&self, other: &AllowStdIo<T>) -> bool
This method tests for !=
.
sourceimpl<T> PartialOrd<AllowStdIo<T>> for AllowStdIo<T> where
T: PartialOrd<T>,
impl<T> PartialOrd<AllowStdIo<T>> for AllowStdIo<T> where
T: PartialOrd<T>,
sourcefn partial_cmp(&self, other: &AllowStdIo<T>) -> Option<Ordering>
fn partial_cmp(&self, other: &AllowStdIo<T>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl<T> Read for AllowStdIo<T> where
T: Read,
impl<T> Read for AllowStdIo<T> where
T: Read,
sourcefn read(&mut self, buf: &mut [u8]) -> Result<usize, Error>
fn read(&mut self, buf: &mut [u8]) -> Result<usize, Error>
Pull some bytes from this source into the specified buffer, returning how many bytes were read. Read more
sourcefn read_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> Result<usize, Error>
fn read_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> Result<usize, Error>
Like read
, except that it reads into a slice of buffers. Read more
sourcefn read_to_end(&mut self, buf: &mut Vec<u8, Global>) -> Result<usize, Error>
fn read_to_end(&mut self, buf: &mut Vec<u8, Global>) -> Result<usize, Error>
Read all bytes until EOF in this source, placing them into buf
. Read more
sourcefn read_to_string(&mut self, buf: &mut String) -> Result<usize, Error>
fn read_to_string(&mut self, buf: &mut String) -> Result<usize, Error>
Read all bytes until EOF in this source, appending them to buf
. Read more
sourcefn read_exact(&mut self, buf: &mut [u8]) -> Result<(), Error>
fn read_exact(&mut self, buf: &mut [u8]) -> Result<(), Error>
Read the exact number of bytes required to fill buf
. Read more
sourcefn is_read_vectored(&self) -> bool
fn is_read_vectored(&self) -> bool
can_vector
)Determines if this Read
er has an efficient read_vectored
implementation. Read more
sourcefn read_buf(&mut self, buf: &mut ReadBuf<'_>) -> Result<(), Error>
fn read_buf(&mut self, buf: &mut ReadBuf<'_>) -> Result<(), Error>
read_buf
)Pull some bytes from this source into the specified buffer. Read more
sourcefn read_buf_exact(&mut self, buf: &mut ReadBuf<'_>) -> Result<(), Error>
fn read_buf_exact(&mut self, buf: &mut ReadBuf<'_>) -> Result<(), Error>
read_buf
)Read the exact number of bytes required to fill buf
. Read more
1.0.0 · sourcefn by_ref(&mut self) -> &mut Self
fn by_ref(&mut self) -> &mut Self
Creates a “by reference” adaptor for this instance of Read
. Read more
sourceimpl<T> Seek for AllowStdIo<T> where
T: Seek,
impl<T> Seek for AllowStdIo<T> where
T: Seek,
sourcefn seek(&mut self, pos: SeekFrom) -> Result<u64, Error>
fn seek(&mut self, pos: SeekFrom) -> Result<u64, Error>
Seek to an offset, in bytes, in a stream. Read more
1.55.0 · sourcefn rewind(&mut self) -> Result<(), Error>
fn rewind(&mut self) -> Result<(), Error>
Rewind to the beginning of a stream. Read more
sourceimpl<T> Write for AllowStdIo<T> where
T: Write,
impl<T> Write for AllowStdIo<T> where
T: Write,
sourcefn write(&mut self, buf: &[u8]) -> Result<usize, Error>
fn write(&mut self, buf: &[u8]) -> Result<usize, Error>
Write a buffer into this writer, returning how many bytes were written. Read more
sourcefn flush(&mut self) -> Result<(), Error>
fn flush(&mut self) -> Result<(), Error>
Flush this output stream, ensuring that all intermediately buffered contents reach their destination. Read more
sourcefn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
Attempts to write an entire buffer into this writer. Read more
sourcefn write_fmt(&mut self, fmt: Arguments<'_>) -> Result<(), Error>
fn write_fmt(&mut self, fmt: Arguments<'_>) -> Result<(), Error>
Writes a formatted string into this writer, returning any error encountered. Read more
sourcefn is_write_vectored(&self) -> bool
fn is_write_vectored(&self) -> bool
can_vector
)Determines if this Write
r has an efficient write_vectored
implementation. Read more
impl<T> Copy for AllowStdIo<T> where
T: Copy,
impl<T> Eq for AllowStdIo<T> where
T: Eq,
impl<T> StructuralEq for AllowStdIo<T>
impl<T> StructuralPartialEq for AllowStdIo<T>
impl<T> Unpin for AllowStdIo<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for AllowStdIo<T> where
T: RefUnwindSafe,
impl<T> Send for AllowStdIo<T> where
T: Send,
impl<T> Sync for AllowStdIo<T> where
T: Sync,
impl<T> UnwindSafe for AllowStdIo<T> where
T: UnwindSafe,
Blanket Implementations
sourceimpl<R> AsyncBufReadExt for R where
R: AsyncBufRead + ?Sized,
impl<R> AsyncBufReadExt for R where
R: AsyncBufRead + ?Sized,
sourcefn fill_buf(&mut self) -> FillBuf<'_, Self>ⓘNotable traits for FillBuf<'a, R>impl<'a, R> Future for FillBuf<'a, R> where
R: AsyncBufRead + Unpin + ?Sized, type Output = Result<&'a [u8], Error>;
where
Self: Unpin,
fn fill_buf(&mut self) -> FillBuf<'_, Self>ⓘNotable traits for FillBuf<'a, R>impl<'a, R> Future for FillBuf<'a, R> where
R: AsyncBufRead + Unpin + ?Sized, type Output = Result<&'a [u8], Error>;
where
Self: Unpin,
R: AsyncBufRead + Unpin + ?Sized, type Output = Result<&'a [u8], Error>;
Creates a future which will wait for a non-empty buffer to be available from this I/O object or EOF to be reached. Read more
sourcefn consume_unpin(&mut self, amt: usize) where
Self: Unpin,
fn consume_unpin(&mut self, amt: usize) where
Self: Unpin,
A convenience for calling AsyncBufRead::consume
on Unpin
IO types. Read more
sourcefn read_until(
&'a mut self,
byte: u8,
buf: &'a mut Vec<u8, Global>
) -> ReadUntil<'a, Self>ⓘNotable traits for ReadUntil<'_, R>impl<'_, R> Future for ReadUntil<'_, R> where
R: AsyncBufRead + Unpin + ?Sized, type Output = Result<usize, Error>;
where
Self: Unpin,
fn read_until(
&'a mut self,
byte: u8,
buf: &'a mut Vec<u8, Global>
) -> ReadUntil<'a, Self>ⓘNotable traits for ReadUntil<'_, R>impl<'_, R> Future for ReadUntil<'_, R> where
R: AsyncBufRead + Unpin + ?Sized, type Output = Result<usize, Error>;
where
Self: Unpin,
R: AsyncBufRead + Unpin + ?Sized, type Output = Result<usize, Error>;
Creates a future which will read all the bytes associated with this I/O
object into buf
until the delimiter byte
or EOF is reached.
This method is the async equivalent to BufRead::read_until
. Read more
sourcefn read_line(&'a mut self, buf: &'a mut String) -> ReadLine<'a, Self>ⓘNotable traits for ReadLine<'_, R>impl<'_, R> Future for ReadLine<'_, R> where
R: AsyncBufRead + Unpin + ?Sized, type Output = Result<usize, Error>;
where
Self: Unpin,
fn read_line(&'a mut self, buf: &'a mut String) -> ReadLine<'a, Self>ⓘNotable traits for ReadLine<'_, R>impl<'_, R> Future for ReadLine<'_, R> where
R: AsyncBufRead + Unpin + ?Sized, type Output = Result<usize, Error>;
where
Self: Unpin,
R: AsyncBufRead + Unpin + ?Sized, type Output = Result<usize, Error>;
Creates a future which will read all the bytes associated with this I/O
object into buf
until a newline (the 0xA byte) or EOF is reached,
This method is the async equivalent to BufRead::read_line
. Read more
sourcefn lines(self) -> Lines<Self>
fn lines(self) -> Lines<Self>
Returns a stream over the lines of this reader.
This method is the async equivalent to BufRead::lines
. Read more
sourceimpl<R> AsyncReadExt for R where
R: AsyncRead + ?Sized,
impl<R> AsyncReadExt for R where
R: AsyncRead + ?Sized,
sourcefn chain<R>(self, next: R) -> Chain<Self, R> where
R: AsyncRead,
fn chain<R>(self, next: R) -> Chain<Self, R> where
R: AsyncRead,
Creates an adaptor which will chain this stream with another. Read more
sourcefn read(&'a mut self, buf: &'a mut [u8]) -> Read<'a, Self>ⓘNotable traits for Read<'_, R>impl<'_, R> Future for Read<'_, R> where
R: AsyncRead + Unpin + ?Sized, type Output = Result<usize, Error>;
where
Self: Unpin,
fn read(&'a mut self, buf: &'a mut [u8]) -> Read<'a, Self>ⓘNotable traits for Read<'_, R>impl<'_, R> Future for Read<'_, R> where
R: AsyncRead + Unpin + ?Sized, type Output = Result<usize, Error>;
where
Self: Unpin,
R: AsyncRead + Unpin + ?Sized, type Output = Result<usize, Error>;
Tries to read some bytes directly into the given buf
in asynchronous
manner, returning a future type. Read more
sourcefn read_vectored(
&'a mut self,
bufs: &'a mut [IoSliceMut<'a>]
) -> ReadVectored<'a, Self>ⓘNotable traits for ReadVectored<'_, R>impl<'_, R> Future for ReadVectored<'_, R> where
R: AsyncRead + Unpin + ?Sized, type Output = Result<usize, Error>;
where
Self: Unpin,
fn read_vectored(
&'a mut self,
bufs: &'a mut [IoSliceMut<'a>]
) -> ReadVectored<'a, Self>ⓘNotable traits for ReadVectored<'_, R>impl<'_, R> Future for ReadVectored<'_, R> where
R: AsyncRead + Unpin + ?Sized, type Output = Result<usize, Error>;
where
Self: Unpin,
R: AsyncRead + Unpin + ?Sized, type Output = Result<usize, Error>;
Creates a future which will read from the AsyncRead
into bufs
using vectored
IO operations. Read more
sourcefn read_exact(&'a mut self, buf: &'a mut [u8]) -> ReadExact<'a, Self>ⓘNotable traits for ReadExact<'_, R>impl<'_, R> Future for ReadExact<'_, R> where
R: AsyncRead + Unpin + ?Sized, type Output = Result<(), Error>;
where
Self: Unpin,
fn read_exact(&'a mut self, buf: &'a mut [u8]) -> ReadExact<'a, Self>ⓘNotable traits for ReadExact<'_, R>impl<'_, R> Future for ReadExact<'_, R> where
R: AsyncRead + Unpin + ?Sized, type Output = Result<(), Error>;
where
Self: Unpin,
R: AsyncRead + Unpin + ?Sized, type Output = Result<(), Error>;
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
sourcefn read_to_end(
&'a mut self,
buf: &'a mut Vec<u8, Global>
) -> ReadToEnd<'a, Self>ⓘNotable traits for ReadToEnd<'_, A>impl<'_, A> Future for ReadToEnd<'_, A> where
A: AsyncRead + Unpin + ?Sized, type Output = Result<usize, Error>;
where
Self: Unpin,
fn read_to_end(
&'a mut self,
buf: &'a mut Vec<u8, Global>
) -> ReadToEnd<'a, Self>ⓘNotable traits for ReadToEnd<'_, A>impl<'_, A> Future for ReadToEnd<'_, A> where
A: AsyncRead + Unpin + ?Sized, type Output = Result<usize, Error>;
where
Self: Unpin,
A: AsyncRead + Unpin + ?Sized, type Output = Result<usize, Error>;
Creates a future which will read all the bytes from this AsyncRead
. Read more
sourcefn read_to_string(&'a mut self, buf: &'a mut String) -> ReadToString<'a, Self>ⓘNotable traits for ReadToString<'_, A>impl<'_, A> Future for ReadToString<'_, A> where
A: AsyncRead + Unpin + ?Sized, type Output = Result<usize, Error>;
where
Self: Unpin,
fn read_to_string(&'a mut self, buf: &'a mut String) -> ReadToString<'a, Self>ⓘNotable traits for ReadToString<'_, A>impl<'_, A> Future for ReadToString<'_, A> where
A: AsyncRead + Unpin + ?Sized, type Output = Result<usize, Error>;
where
Self: Unpin,
A: AsyncRead + Unpin + ?Sized, type Output = Result<usize, Error>;
Creates a future which will read all the bytes from this AsyncRead
. Read more
sourceimpl<S> AsyncSeekExt for S where
S: AsyncSeek + ?Sized,
impl<S> AsyncSeekExt for S where
S: AsyncSeek + ?Sized,
sourcefn seek(&mut self, pos: SeekFrom) -> Seek<'_, Self>ⓘNotable traits for Seek<'_, S>impl<'_, S> Future for Seek<'_, S> where
S: AsyncSeek + Unpin + ?Sized, type Output = Result<u64, Error>;
where
Self: Unpin,
fn seek(&mut self, pos: SeekFrom) -> Seek<'_, Self>ⓘNotable traits for Seek<'_, S>impl<'_, S> Future for Seek<'_, S> where
S: AsyncSeek + Unpin + ?Sized, type Output = Result<u64, Error>;
where
Self: Unpin,
S: AsyncSeek + Unpin + ?Sized, type Output = Result<u64, Error>;
Creates a future which will seek an IO object, and then yield the new position in the object and the object itself. Read more
sourcefn stream_position(&mut self) -> Seek<'_, Self>ⓘNotable traits for Seek<'_, S>impl<'_, S> Future for Seek<'_, S> where
S: AsyncSeek + Unpin + ?Sized, type Output = Result<u64, Error>;
where
Self: Unpin,
fn stream_position(&mut self) -> Seek<'_, Self>ⓘNotable traits for Seek<'_, S>impl<'_, S> Future for Seek<'_, S> where
S: AsyncSeek + Unpin + ?Sized, type Output = Result<u64, Error>;
where
Self: Unpin,
S: AsyncSeek + Unpin + ?Sized, type Output = Result<u64, Error>;
Creates a future which will return the current seek position from the start of the stream. Read more
sourceimpl<W> AsyncWriteExt for W where
W: AsyncWrite + ?Sized,
impl<W> AsyncWriteExt for W where
W: AsyncWrite + ?Sized,
sourcefn flush(&mut self) -> Flush<'_, Self>ⓘNotable traits for Flush<'_, W>impl<'_, W> Future for Flush<'_, W> where
W: AsyncWrite + Unpin + ?Sized, type Output = Result<(), Error>;
where
Self: Unpin,
fn flush(&mut self) -> Flush<'_, Self>ⓘNotable traits for Flush<'_, W>impl<'_, W> Future for Flush<'_, W> where
W: AsyncWrite + Unpin + ?Sized, type Output = Result<(), Error>;
where
Self: Unpin,
W: AsyncWrite + Unpin + ?Sized, type Output = Result<(), Error>;
Creates a future which will entirely flush this AsyncWrite
. Read more
sourcefn close(&mut self) -> Close<'_, Self>ⓘNotable traits for Close<'_, W>impl<'_, W> Future for Close<'_, W> where
W: AsyncWrite + Unpin + ?Sized, type Output = Result<(), Error>;
where
Self: Unpin,
fn close(&mut self) -> Close<'_, Self>ⓘNotable traits for Close<'_, W>impl<'_, W> Future for Close<'_, W> where
W: AsyncWrite + Unpin + ?Sized, type Output = Result<(), Error>;
where
Self: Unpin,
W: AsyncWrite + Unpin + ?Sized, type Output = Result<(), Error>;
Creates a future which will entirely close this AsyncWrite
.
sourcefn write(&'a mut self, buf: &'a [u8]) -> Write<'a, Self>ⓘNotable traits for Write<'_, W>impl<'_, W> Future for Write<'_, W> where
W: AsyncWrite + Unpin + ?Sized, type Output = Result<usize, Error>;
where
Self: Unpin,
fn write(&'a mut self, buf: &'a [u8]) -> Write<'a, Self>ⓘNotable traits for Write<'_, W>impl<'_, W> Future for Write<'_, W> where
W: AsyncWrite + Unpin + ?Sized, type Output = Result<usize, Error>;
where
Self: Unpin,
W: AsyncWrite + Unpin + ?Sized, type Output = Result<usize, Error>;
Creates a future which will write bytes from buf
into the object. Read more
sourcefn write_vectored(
&'a mut self,
bufs: &'a [IoSlice<'a>]
) -> WriteVectored<'a, Self>ⓘNotable traits for WriteVectored<'_, W>impl<'_, W> Future for WriteVectored<'_, W> where
W: AsyncWrite + Unpin + ?Sized, type Output = Result<usize, Error>;
where
Self: Unpin,
fn write_vectored(
&'a mut self,
bufs: &'a [IoSlice<'a>]
) -> WriteVectored<'a, Self>ⓘNotable traits for WriteVectored<'_, W>impl<'_, W> Future for WriteVectored<'_, W> where
W: AsyncWrite + Unpin + ?Sized, type Output = Result<usize, Error>;
where
Self: Unpin,
W: AsyncWrite + Unpin + ?Sized, type Output = Result<usize, Error>;
Creates a future which will write bytes from bufs
into the object using vectored
IO operations. Read more
sourcefn write_all(&'a mut self, buf: &'a [u8]) -> WriteAll<'a, Self>ⓘNotable traits for WriteAll<'_, W>impl<'_, W> Future for WriteAll<'_, W> where
W: AsyncWrite + Unpin + ?Sized, type Output = Result<(), Error>;
where
Self: Unpin,
fn write_all(&'a mut self, buf: &'a [u8]) -> WriteAll<'a, Self>ⓘNotable traits for WriteAll<'_, W>impl<'_, W> Future for WriteAll<'_, W> where
W: AsyncWrite + Unpin + ?Sized, type Output = Result<(), Error>;
where
Self: Unpin,
W: AsyncWrite + Unpin + ?Sized, type Output = Result<(), Error>;
Write data into this object. Read more
sourcefn write_all_vectored(
&'a mut self,
bufs: &'a mut [IoSlice<'a>]
) -> WriteAllVectored<'a, Self>ⓘNotable traits for WriteAllVectored<'_, W>impl<'_, W> Future for WriteAllVectored<'_, W> where
W: AsyncWrite + Unpin + ?Sized, type Output = Result<(), Error>;
where
Self: Unpin,
fn write_all_vectored(
&'a mut self,
bufs: &'a mut [IoSlice<'a>]
) -> WriteAllVectored<'a, Self>ⓘNotable traits for WriteAllVectored<'_, W>impl<'_, W> Future for WriteAllVectored<'_, W> where
W: AsyncWrite + Unpin + ?Sized, type Output = Result<(), Error>;
where
Self: Unpin,
W: AsyncWrite + Unpin + ?Sized, type Output = Result<(), Error>;
Attempts to write multiple buffers into this writer. Read more
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more