[−][src]Struct futures_test::io::read::Limited
I/O wrapper that limits the number of bytes written or read on each call.
See the limited
and limited_write
methods.
Implementations
impl<Io> Limited<Io>
[src]
pub fn get_ref(&self) -> &Ioⓘ
[src]
Acquires a reference to the underlying I/O object that this adaptor is wrapping.
pub fn get_mut(&mut self) -> &mut Ioⓘ
[src]
Acquires a mutable reference to the underlying I/O object that this adaptor is wrapping.
pub fn get_pin_mut(self: Pin<&mut Self>) -> Pin<&mut Io>ⓘ
[src]
Acquires a pinned mutable reference to the underlying I/O object that this adaptor is wrapping.
pub fn into_inner(self) -> Io
[src]
Consumes this adaptor returning the underlying I/O object.
Trait Implementations
impl<R: AsyncBufRead> AsyncBufRead for Limited<R>
[src]
pub fn poll_fill_buf(
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Result<&[u8]>>
[src]
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Result<&[u8]>>
pub fn consume(self: Pin<&mut Self>, amount: usize)
[src]
impl<R: AsyncRead> AsyncRead for Limited<R>
[src]
pub fn poll_read(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
buf: &mut [u8]
) -> Poll<Result<usize>>
[src]
self: Pin<&mut Self>,
cx: &mut Context<'_>,
buf: &mut [u8]
) -> Poll<Result<usize>>
pub fn poll_read_vectored(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
bufs: &mut [IoSliceMut<'_>]
) -> Poll<Result<usize, Error>>
[src]
self: Pin<&mut Self>,
cx: &mut Context<'_>,
bufs: &mut [IoSliceMut<'_>]
) -> Poll<Result<usize, Error>>
impl<W: AsyncWrite> AsyncWrite for Limited<W>
[src]
pub fn poll_write(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
buf: &[u8]
) -> Poll<Result<usize>>
[src]
self: Pin<&mut Self>,
cx: &mut Context<'_>,
buf: &[u8]
) -> Poll<Result<usize>>
pub fn poll_flush(
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Result<()>>
[src]
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Result<()>>
pub fn poll_close(
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Result<()>>
[src]
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Result<()>>
pub fn poll_write_vectored(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
bufs: &[IoSlice<'_>]
) -> Poll<Result<usize, Error>>
[src]
self: Pin<&mut Self>,
cx: &mut Context<'_>,
bufs: &[IoSlice<'_>]
) -> Poll<Result<usize, Error>>
impl<Io: Debug> Debug for Limited<Io>
[src]
impl<'pin, Io> Unpin for Limited<Io> where
__Limited<'pin, Io>: Unpin,
[src]
__Limited<'pin, Io>: Unpin,
Auto Trait Implementations
impl<Io> RefUnwindSafe for Limited<Io> where
Io: RefUnwindSafe,
[src]
Io: RefUnwindSafe,
impl<Io> Send for Limited<Io> where
Io: Send,
[src]
Io: Send,
impl<Io> Sync for Limited<Io> where
Io: Sync,
[src]
Io: Sync,
impl<Io> UnwindSafe for Limited<Io> where
Io: UnwindSafe,
[src]
Io: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<R> AsyncBufReadExt for R where
R: AsyncBufRead + ?Sized,
[src]
R: AsyncBufRead + ?Sized,
pub fn fill_buf(&mut self) -> FillBuf<'_, Self>ⓘ where
Self: Unpin,
[src]
Self: Unpin,
pub fn consume_unpin(&mut self, amt: usize) where
Self: Unpin,
[src]
Self: Unpin,
pub fn read_until(
&'a mut self,
byte: u8,
buf: &'a mut Vec<u8, Global>
) -> ReadUntil<'a, Self>ⓘ where
Self: Unpin,
[src]
&'a mut self,
byte: u8,
buf: &'a mut Vec<u8, Global>
) -> ReadUntil<'a, Self>ⓘ where
Self: Unpin,
pub fn read_line(&'a mut self, buf: &'a mut String) -> ReadLine<'a, Self>ⓘ where
Self: Unpin,
[src]
Self: Unpin,
pub fn lines(self) -> Lines<Self>
[src]
impl<R> AsyncReadExt for R where
R: AsyncRead + ?Sized,
[src]
R: AsyncRead + ?Sized,
pub fn chain<R>(self, next: R) -> Chain<Self, R> where
R: AsyncRead,
[src]
R: AsyncRead,
pub fn read(&'a mut self, buf: &'a mut [u8]) -> Read<'a, Self>ⓘ where
Self: Unpin,
[src]
Self: Unpin,
pub 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: Unpin + AsyncRead + ?Sized, type Output = Result<usize, Error>;
where
Self: Unpin,
[src]
&'a mut self,
bufs: &'a mut [IoSliceMut<'a>]
) -> ReadVectored<'a, Self>ⓘ
Notable traits for ReadVectored<'_, R>
impl<'_, R> Future for ReadVectored<'_, R> where
R: Unpin + AsyncRead + ?Sized, type Output = Result<usize, Error>;
Self: Unpin,
pub fn read_exact(&'a mut self, buf: &'a mut [u8]) -> ReadExact<'a, Self>ⓘ where
Self: Unpin,
[src]
Self: Unpin,
pub fn read_to_end(
&'a mut self,
buf: &'a mut Vec<u8, Global>
) -> ReadToEnd<'a, Self>ⓘ where
Self: Unpin,
[src]
&'a mut self,
buf: &'a mut Vec<u8, Global>
) -> ReadToEnd<'a, Self>ⓘ where
Self: Unpin,
pub 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,
[src]
&'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>;
Self: Unpin,
pub fn split(self) -> (ReadHalf<Self>, WriteHalf<Self>) where
Self: AsyncWrite,
[src]
Self: AsyncWrite,
pub fn take(self, limit: u64) -> Take<Self>
[src]
impl<R> AsyncReadTestExt for R where
R: AsyncRead,
[src]
R: AsyncRead,
pub fn assert_unmoved(self) -> AssertUnmoved<Self>ⓘNotable traits for AssertUnmoved<Fut>
impl<Fut: Future> Future for AssertUnmoved<Fut> type Output = Fut::Output;
where
Self: Sized,
[src]
Notable traits for AssertUnmoved<Fut>
impl<Fut: Future> Future for AssertUnmoved<Fut> type Output = Fut::Output;
Self: Sized,
pub fn interleave_pending(self) -> InterleavePending<Self>ⓘNotable traits for InterleavePending<Fut>
impl<Fut: Future> Future for InterleavePending<Fut> type Output = Fut::Output;
where
Self: Sized,
[src]
Notable traits for InterleavePending<Fut>
impl<Fut: Future> Future for InterleavePending<Fut> type Output = Fut::Output;
Self: Sized,
pub fn limited(self, limit: usize) -> Limited<Self> where
Self: Sized,
[src]
Self: Sized,
impl<W> AsyncWriteExt for W where
W: AsyncWrite + ?Sized,
[src]
W: AsyncWrite + ?Sized,
pub fn flush(&mut self) -> Flush<'_, Self>ⓘ where
Self: Unpin,
[src]
Self: Unpin,
pub fn close(&mut self) -> Close<'_, Self>ⓘ where
Self: Unpin,
[src]
Self: Unpin,
pub fn write(&'a mut self, buf: &'a [u8]) -> Write<'a, Self>ⓘ where
Self: Unpin,
[src]
Self: Unpin,
pub 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: Unpin + AsyncWrite + ?Sized, type Output = Result<usize, Error>;
where
Self: Unpin,
[src]
&'a mut self,
bufs: &'a [IoSlice<'a>]
) -> WriteVectored<'a, Self>ⓘ
Notable traits for WriteVectored<'_, W>
impl<'_, W> Future for WriteVectored<'_, W> where
W: Unpin + AsyncWrite + ?Sized, type Output = Result<usize, Error>;
Self: Unpin,
pub fn write_all(&'a mut self, buf: &'a [u8]) -> WriteAll<'a, Self>ⓘ where
Self: Unpin,
[src]
Self: Unpin,
impl<W> AsyncWriteTestExt for W where
W: AsyncWrite,
[src]
W: AsyncWrite,
pub fn assert_unmoved_write(self) -> AssertUnmoved<Self>ⓘNotable traits for AssertUnmoved<Fut>
impl<Fut: Future> Future for AssertUnmoved<Fut> type Output = Fut::Output;
where
Self: Sized,
[src]
Notable traits for AssertUnmoved<Fut>
impl<Fut: Future> Future for AssertUnmoved<Fut> type Output = Fut::Output;
Self: Sized,
pub fn interleave_pending_write(self) -> InterleavePending<Self>ⓘNotable traits for InterleavePending<Fut>
impl<Fut: Future> Future for InterleavePending<Fut> type Output = Fut::Output;
where
Self: Sized,
[src]
Notable traits for InterleavePending<Fut>
impl<Fut: Future> Future for InterleavePending<Fut> type Output = Fut::Output;
Self: Sized,
pub fn limited_write(self, limit: usize) -> Limited<Self> where
Self: Sized,
[src]
Self: Sized,
pub fn track_closed(self) -> TrackClosed<Self> where
Self: Sized,
[src]
Self: Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut Tⓘ
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,