Struct futures::compat::Compat [−][src]
#[must_use = "futures do nothing unless you `.await` or poll them"]pub struct Compat<T> { /* fields omitted */ }
compat only.Expand description
Implementations
impl<T> Compat<T>[src]
impl<T> Compat<T>[src]pub fn new(inner: T) -> Compat<T>ⓘ[src]
pub fn new(inner: T) -> Compat<T>ⓘ[src]Creates a new Compat.
For types which implement appropriate futures 0.3
traits, the result will be a type which implements
the corresponding futures 0.1 type.
pub fn get_ref(&self) -> &T[src]
pub fn get_ref(&self) -> &T[src]Get a reference to 0.3 Future, Stream, AsyncRead, or AsyncWrite object contained within.
pub fn get_mut(&mut self) -> &mut T[src]
pub fn get_mut(&mut self) -> &mut T[src]Get a mutable reference to 0.3 Future, Stream, AsyncRead, or AsyncWrite object contained within.
pub fn into_inner(self) -> T[src]
pub fn into_inner(self) -> T[src]Returns the inner item.
Trait Implementations
impl<R> AsyncRead for Compat<R> where
R: AsyncRead + Unpin, [src]
impl<R> AsyncRead for Compat<R> where
R: AsyncRead + Unpin, [src]pub unsafe fn prepare_uninitialized_buffer(&self, buf: &mut [u8]) -> bool[src]
pub unsafe fn prepare_uninitialized_buffer(&self, buf: &mut [u8]) -> bool[src]Prepares an uninitialized buffer to be safe to pass to read. Returns
true if the supplied buffer was zeroed out. Read more
fn poll_read(&mut self, buf: &mut [u8]) -> Result<Async<usize>, Error>[src]
fn poll_read(&mut self, buf: &mut [u8]) -> Result<Async<usize>, Error>[src]Attempt to read from the AsyncRead into buf. Read more
fn read_buf<B>(&mut self, buf: &mut B) -> Result<Async<usize>, Error> where
B: BufMut, [src]
fn read_buf<B>(&mut self, buf: &mut B) -> Result<Async<usize>, Error> where
B: BufMut, [src]Pull some bytes from this source into the specified BufMut, returning
how many bytes were read. Read more
fn framed<T>(self, codec: T) -> Framed<Self, T> where
Self: AsyncWrite,
T: Encoder + Decoder, [src]
fn framed<T>(self, codec: T) -> Framed<Self, T> where
Self: AsyncWrite,
T: Encoder + Decoder, [src]Use tokio_codec::Decoder::framed instead
Provides a Stream and Sink interface for reading and writing to this
I/O object, using Decode and Encode to read and write the raw data. Read more
impl<W> AsyncWrite for Compat<W> where
W: AsyncWrite + Unpin, [src]
impl<W> AsyncWrite for Compat<W> where
W: AsyncWrite + Unpin, [src]pub fn shutdown(&mut self) -> Result<Async<()>, Error>[src]
pub fn shutdown(&mut self) -> Result<Async<()>, Error>[src]Initiates or attempts to shut down this writer, returning success when the I/O connection has completely shut down. Read more
fn poll_write(&mut self, buf: &[u8]) -> Result<Async<usize>, Error>[src]
fn poll_write(&mut self, buf: &[u8]) -> Result<Async<usize>, Error>[src]Attempt to write bytes from buf into the object. Read more
impl<T> Clone for Compat<T> where
T: Clone, [src]
impl<T> Clone for Compat<T> where
T: Clone, [src]impl<Sp, Fut> Executor<Fut> for Compat<Sp> where
Fut: Future<Item = (), Error = ()> + Send + 'static,
&'a Sp: for<'a> Spawn, [src]
impl<Sp, Fut> Executor<Fut> for Compat<Sp> where
Fut: Future<Item = (), Error = ()> + Send + 'static,
&'a Sp: for<'a> Spawn, [src]impl<Fut> Future for Compat<Fut> where
Fut: TryFuture + Unpin, [src]
impl<Fut> Future for Compat<Fut> where
Fut: TryFuture + Unpin, [src]type Item = <Fut as TryFuture>::Ok
type Item = <Fut as TryFuture>::OkThe type of value that this future will resolved with if it is successful. Read more
type Error = <Fut as TryFuture>::Error
type Error = <Fut as TryFuture>::ErrorThe type of error that this future will resolve with if it fails in a normal fashion. Read more
pub fn poll(
&mut self
) -> Result<Async<<Compat<Fut> as Future>::Item>, <Compat<Fut> as Future>::Error>[src]
pub fn poll(
&mut self
) -> Result<Async<<Compat<Fut> as Future>::Item>, <Compat<Fut> as Future>::Error>[src]Query this future to see if its value has become available, registering interest if it is not. Read more
fn wait(self) -> Result<Self::Item, Self::Error>[src]
fn wait(self) -> Result<Self::Item, Self::Error>[src]Block the current thread until this future is resolved. Read more
fn map<F, U>(self, f: F) -> Map<Self, F> where
F: FnOnce(Self::Item) -> U, [src]
fn map<F, U>(self, f: F) -> Map<Self, F> where
F: FnOnce(Self::Item) -> U, [src]Map this future’s result to a different type, returning a new future of the resulting type. Read more
fn map_err<F, E>(self, f: F) -> MapErr<Self, F> where
F: FnOnce(Self::Error) -> E, [src]
fn map_err<F, E>(self, f: F) -> MapErr<Self, F> where
F: FnOnce(Self::Error) -> E, [src]Map this future’s error to a different error, returning a new future. Read more
fn from_err<E>(self) -> FromErr<Self, E> where
E: From<Self::Error>, [src]
fn from_err<E>(self) -> FromErr<Self, E> where
E: From<Self::Error>, [src]Map this future’s error to any error implementing From for
this future’s Error, returning a new future. Read more
fn then<F, B>(self, f: F) -> Then<Self, B, F> where
B: IntoFuture,
F: FnOnce(Result<Self::Item, Self::Error>) -> B, [src]
fn then<F, B>(self, f: F) -> Then<Self, B, F> where
B: IntoFuture,
F: FnOnce(Result<Self::Item, Self::Error>) -> B, [src]Chain on a computation for when a future finished, passing the result of
the future to the provided closure f. Read more
fn and_then<F, B>(self, f: F) -> AndThen<Self, B, F> where
B: IntoFuture<Error = Self::Error>,
F: FnOnce(Self::Item) -> B, [src]
fn and_then<F, B>(self, f: F) -> AndThen<Self, B, F> where
B: IntoFuture<Error = Self::Error>,
F: FnOnce(Self::Item) -> B, [src]Execute another future after this one has resolved successfully. Read more
fn or_else<F, B>(self, f: F) -> OrElse<Self, B, F> where
B: IntoFuture<Item = Self::Item>,
F: FnOnce(Self::Error) -> B, [src]
fn or_else<F, B>(self, f: F) -> OrElse<Self, B, F> where
B: IntoFuture<Item = Self::Item>,
F: FnOnce(Self::Error) -> B, [src]Execute another future if this one resolves with an error. Read more
fn select<B>(self, other: B) -> Select<Self, <B as IntoFuture>::Future> where
B: IntoFuture<Item = Self::Item, Error = Self::Error>, [src]
fn select<B>(self, other: B) -> Select<Self, <B as IntoFuture>::Future> where
B: IntoFuture<Item = Self::Item, Error = Self::Error>, [src]Waits for either one of two futures to complete. Read more
fn select2<B>(self, other: B) -> Select2<Self, <B as IntoFuture>::Future> where
B: IntoFuture, [src]
fn select2<B>(self, other: B) -> Select2<Self, <B as IntoFuture>::Future> where
B: IntoFuture, [src]Waits for either one of two differently-typed futures to complete. Read more
fn join<B>(self, other: B) -> Join<Self, <B as IntoFuture>::Future> where
B: IntoFuture<Error = Self::Error>, [src]
fn join<B>(self, other: B) -> Join<Self, <B as IntoFuture>::Future> where
B: IntoFuture<Error = Self::Error>, [src]Joins the result of two futures, waiting for them both to complete. Read more
fn join3<B, C>(
self,
b: B,
c: C
) -> Join3<Self, <B as IntoFuture>::Future, <C as IntoFuture>::Future> where
C: IntoFuture<Error = Self::Error>,
B: IntoFuture<Error = Self::Error>, [src]
fn join3<B, C>(
self,
b: B,
c: C
) -> Join3<Self, <B as IntoFuture>::Future, <C as IntoFuture>::Future> where
C: IntoFuture<Error = Self::Error>,
B: IntoFuture<Error = Self::Error>, [src]Same as join, but with more futures.
fn join4<B, C, D>(
self,
b: B,
c: C,
d: D
) -> Join4<Self, <B as IntoFuture>::Future, <C as IntoFuture>::Future, <D as IntoFuture>::Future> where
C: IntoFuture<Error = Self::Error>,
B: IntoFuture<Error = Self::Error>,
D: IntoFuture<Error = Self::Error>, [src]
fn join4<B, C, D>(
self,
b: B,
c: C,
d: D
) -> Join4<Self, <B as IntoFuture>::Future, <C as IntoFuture>::Future, <D as IntoFuture>::Future> where
C: IntoFuture<Error = Self::Error>,
B: IntoFuture<Error = Self::Error>,
D: IntoFuture<Error = Self::Error>, [src]Same as join, but with more futures.
fn join5<B, C, D, E>(
self,
b: B,
c: C,
d: D,
e: E
) -> Join5<Self, <B as IntoFuture>::Future, <C as IntoFuture>::Future, <D as IntoFuture>::Future, <E as IntoFuture>::Future> where
C: IntoFuture<Error = Self::Error>,
E: IntoFuture<Error = Self::Error>,
B: IntoFuture<Error = Self::Error>,
D: IntoFuture<Error = Self::Error>, [src]
fn join5<B, C, D, E>(
self,
b: B,
c: C,
d: D,
e: E
) -> Join5<Self, <B as IntoFuture>::Future, <C as IntoFuture>::Future, <D as IntoFuture>::Future, <E as IntoFuture>::Future> where
C: IntoFuture<Error = Self::Error>,
E: IntoFuture<Error = Self::Error>,
B: IntoFuture<Error = Self::Error>,
D: IntoFuture<Error = Self::Error>, [src]Same as join, but with more futures.
fn into_stream(self) -> IntoStream<Self>[src]
fn into_stream(self) -> IntoStream<Self>[src]Convert this future into a single element stream. Read more
fn flatten(self) -> Flatten<Self> where
Self::Item: IntoFuture,
<Self::Item as IntoFuture>::Error: From<Self::Error>, [src]
fn flatten(self) -> Flatten<Self> where
Self::Item: IntoFuture,
<Self::Item as IntoFuture>::Error: From<Self::Error>, [src]Flatten the execution of this future when the successful result of this future is itself another future. Read more
fn flatten_stream(self) -> FlattenStream<Self> where
Self::Item: Stream,
<Self::Item as Stream>::Error == Self::Error, [src]
fn flatten_stream(self) -> FlattenStream<Self> where
Self::Item: Stream,
<Self::Item as Stream>::Error == Self::Error, [src]Flatten the execution of this future when the successful result of this future is a stream. Read more
fn fuse(self) -> Fuse<Self>[src]
fn fuse(self) -> Fuse<Self>[src]Fuse a future such that poll will never again be called once it has
completed. Read more
fn inspect<F>(self, f: F) -> Inspect<Self, F> where
F: FnOnce(&Self::Item), [src]
fn inspect<F>(self, f: F) -> Inspect<Self, F> where
F: FnOnce(&Self::Item), [src]Do something with the item of a future, passing it on. Read more
fn catch_unwind(self) -> CatchUnwind<Self> where
Self: UnwindSafe, [src]
fn catch_unwind(self) -> CatchUnwind<Self> where
Self: UnwindSafe, [src]Catches unwinding panics while polling the future. Read more
impl<R> Read for Compat<R> where
R: AsyncRead + Unpin, [src]
impl<R> Read for Compat<R> where
R: AsyncRead + Unpin, [src]pub fn read(&mut self, buf: &mut [u8]) -> Result<usize, Error>[src]
pub fn read(&mut self, buf: &mut [u8]) -> Result<usize, Error>[src]Pull some bytes from this source into the specified buffer, returning how many bytes were read. Read more
fn read_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> Result<usize, Error>1.36.0[src]
fn read_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> Result<usize, Error>1.36.0[src]Like read, except that it reads into a slice of buffers. Read more
fn is_read_vectored(&self) -> bool[src]
fn is_read_vectored(&self) -> bool[src]can_vector)Determines if this Reader has an efficient read_vectored
implementation. Read more
unsafe fn initializer(&self) -> Initializer[src]
unsafe fn initializer(&self) -> Initializer[src]read_initializer)Determines if this Reader can work with buffers of uninitialized
memory. Read more
fn read_to_end(&mut self, buf: &mut Vec<u8, Global>) -> Result<usize, Error>1.0.0[src]
fn read_to_end(&mut self, buf: &mut Vec<u8, Global>) -> Result<usize, Error>1.0.0[src]Read all bytes until EOF in this source, placing them into buf. Read more
fn read_to_string(&mut self, buf: &mut String) -> Result<usize, Error>1.0.0[src]
fn read_to_string(&mut self, buf: &mut String) -> Result<usize, Error>1.0.0[src]Read all bytes until EOF in this source, appending them to buf. Read more
fn read_exact(&mut self, buf: &mut [u8]) -> Result<(), Error>1.6.0[src]
fn read_exact(&mut self, buf: &mut [u8]) -> Result<(), Error>1.6.0[src]Read the exact number of bytes required to fill buf. Read more
fn by_ref(&mut self) -> &mut Self1.0.0[src]
fn by_ref(&mut self) -> &mut Self1.0.0[src]Creates a “by reference” adaptor for this instance of Read. Read more
impl<St> Stream for Compat<St> where
St: TryStream + Unpin, [src]
impl<St> Stream for Compat<St> where
St: TryStream + Unpin, [src]pub fn poll(
&mut self
) -> Result<Async<Option<<Compat<St> as Stream>::Item>>, <Compat<St> as Stream>::Error>[src]
pub fn poll(
&mut self
) -> Result<Async<Option<<Compat<St> as Stream>::Item>>, <Compat<St> as Stream>::Error>[src]Attempt to pull out the next value of this stream, returning None if
the stream is finished. Read more
fn wait(self) -> Wait<Self>[src]
fn wait(self) -> Wait<Self>[src]Creates an iterator which blocks the current thread until each item of this stream is resolved. Read more
fn into_future(self) -> StreamFuture<Self>[src]
fn into_future(self) -> StreamFuture<Self>[src]Converts this stream into a Future. Read more
fn map<U, F>(self, f: F) -> Map<Self, F> where
F: FnMut(Self::Item) -> U, [src]
fn map<U, F>(self, f: F) -> Map<Self, F> where
F: FnMut(Self::Item) -> U, [src]Converts a stream of type T to a stream of type U. Read more
fn map_err<U, F>(self, f: F) -> MapErr<Self, F> where
F: FnMut(Self::Error) -> U, [src]
fn map_err<U, F>(self, f: F) -> MapErr<Self, F> where
F: FnMut(Self::Error) -> U, [src]Converts a stream of error type T to a stream of error type U. Read more
fn filter<F>(self, f: F) -> Filter<Self, F> where
F: FnMut(&Self::Item) -> bool, [src]
fn filter<F>(self, f: F) -> Filter<Self, F> where
F: FnMut(&Self::Item) -> bool, [src]Filters the values produced by this stream according to the provided predicate. Read more
fn filter_map<F, B>(self, f: F) -> FilterMap<Self, F> where
F: FnMut(Self::Item) -> Option<B>, [src]
fn filter_map<F, B>(self, f: F) -> FilterMap<Self, F> where
F: FnMut(Self::Item) -> Option<B>, [src]Filters the values produced by this stream while simultaneously mapping them to a different type. Read more
fn then<F, U>(self, f: F) -> Then<Self, F, U> where
F: FnMut(Result<Self::Item, Self::Error>) -> U,
U: IntoFuture, [src]
fn then<F, U>(self, f: F) -> Then<Self, F, U> where
F: FnMut(Result<Self::Item, Self::Error>) -> U,
U: IntoFuture, [src]Chain on a computation for when a value is ready, passing the resulting
item to the provided closure f. Read more
fn and_then<F, U>(self, f: F) -> AndThen<Self, F, U> where
F: FnMut(Self::Item) -> U,
U: IntoFuture<Error = Self::Error>, [src]
fn and_then<F, U>(self, f: F) -> AndThen<Self, F, U> where
F: FnMut(Self::Item) -> U,
U: IntoFuture<Error = Self::Error>, [src]Chain on a computation for when a value is ready, passing the successful
results to the provided closure f. Read more
fn or_else<F, U>(self, f: F) -> OrElse<Self, F, U> where
F: FnMut(Self::Error) -> U,
U: IntoFuture<Item = Self::Item>, [src]
fn or_else<F, U>(self, f: F) -> OrElse<Self, F, U> where
F: FnMut(Self::Error) -> U,
U: IntoFuture<Item = Self::Item>, [src]Chain on a computation for when an error happens, passing the
erroneous result to the provided closure f. Read more
fn collect(self) -> Collect<Self>[src]
fn collect(self) -> Collect<Self>[src]Collect all of the values of this stream into a vector, returning a future representing the result of that computation. Read more
fn concat2(self) -> Concat2<Self> where
Self::Item: Extend<<Self::Item as IntoIterator>::Item>,
Self::Item: IntoIterator,
Self::Item: Default, [src]
fn concat2(self) -> Concat2<Self> where
Self::Item: Extend<<Self::Item as IntoIterator>::Item>,
Self::Item: IntoIterator,
Self::Item: Default, [src]Concatenate all results of a stream into a single extendable destination, returning a future representing the end result. Read more
fn concat(self) -> Concat<Self> where
Self::Item: Extend<<Self::Item as IntoIterator>::Item>,
Self::Item: IntoIterator, [src]
fn concat(self) -> Concat<Self> where
Self::Item: Extend<<Self::Item as IntoIterator>::Item>,
Self::Item: IntoIterator, [src]please use Stream::concat2 instead
Concatenate all results of a stream into a single extendable destination, returning a future representing the end result. Read more
fn fold<F, T, Fut>(self, init: T, f: F) -> Fold<Self, F, Fut, T> where
F: FnMut(T, Self::Item) -> Fut,
Fut: IntoFuture<Item = T>,
Self::Error: From<<Fut as IntoFuture>::Error>, [src]
fn fold<F, T, Fut>(self, init: T, f: F) -> Fold<Self, F, Fut, T> where
F: FnMut(T, Self::Item) -> Fut,
Fut: IntoFuture<Item = T>,
Self::Error: From<<Fut as IntoFuture>::Error>, [src]Execute an accumulating computation over a stream, collecting all the values into one final result. Read more
fn flatten(self) -> Flatten<Self> where
Self::Item: Stream,
<Self::Item as Stream>::Error: From<Self::Error>, [src]
fn flatten(self) -> Flatten<Self> where
Self::Item: Stream,
<Self::Item as Stream>::Error: From<Self::Error>, [src]Flattens a stream of streams into just one continuous stream. Read more
fn skip_while<P, R>(self, pred: P) -> SkipWhile<Self, P, R> where
P: FnMut(&Self::Item) -> R,
R: IntoFuture<Item = bool, Error = Self::Error>, [src]
fn skip_while<P, R>(self, pred: P) -> SkipWhile<Self, P, R> where
P: FnMut(&Self::Item) -> R,
R: IntoFuture<Item = bool, Error = Self::Error>, [src]Skip elements on this stream while the predicate provided resolves to
true. Read more
fn take_while<P, R>(self, pred: P) -> TakeWhile<Self, P, R> where
P: FnMut(&Self::Item) -> R,
R: IntoFuture<Item = bool, Error = Self::Error>, [src]
fn take_while<P, R>(self, pred: P) -> TakeWhile<Self, P, R> where
P: FnMut(&Self::Item) -> R,
R: IntoFuture<Item = bool, Error = Self::Error>, [src]Take elements from this stream while the predicate provided resolves to
true. Read more
fn for_each<F, U>(self, f: F) -> ForEach<Self, F, U> where
F: FnMut(Self::Item) -> U,
U: IntoFuture<Item = (), Error = Self::Error>, [src]
fn for_each<F, U>(self, f: F) -> ForEach<Self, F, U> where
F: FnMut(Self::Item) -> U,
U: IntoFuture<Item = (), Error = Self::Error>, [src]Runs this stream to completion, executing the provided closure for each element on the stream. Read more
fn from_err<E>(self) -> FromErr<Self, E> where
E: From<Self::Error>, [src]
fn from_err<E>(self) -> FromErr<Self, E> where
E: From<Self::Error>, [src]Map this stream’s error to any error implementing From for
this stream’s Error, returning a new stream. Read more
fn take(self, amt: u64) -> Take<Self>[src]
fn take(self, amt: u64) -> Take<Self>[src]Creates a new stream of at most amt items of the underlying stream. Read more
fn skip(self, amt: u64) -> Skip<Self>[src]
fn skip(self, amt: u64) -> Skip<Self>[src]Creates a new stream which skips amt items of the underlying stream. Read more
fn fuse(self) -> Fuse<Self>[src]
fn fuse(self) -> Fuse<Self>[src]Fuse a stream such that poll will never again be called once it has
finished. Read more
fn catch_unwind(self) -> CatchUnwind<Self> where
Self: UnwindSafe, [src]
fn catch_unwind(self) -> CatchUnwind<Self> where
Self: UnwindSafe, [src]Catches unwinding panics while polling the stream. Read more
fn buffered(self, amt: usize) -> Buffered<Self> where
Self::Item: IntoFuture,
<Self::Item as IntoFuture>::Error == Self::Error, [src]
fn buffered(self, amt: usize) -> Buffered<Self> where
Self::Item: IntoFuture,
<Self::Item as IntoFuture>::Error == Self::Error, [src]An adaptor for creating a buffered list of pending futures. Read more
fn buffer_unordered(self, amt: usize) -> BufferUnordered<Self> where
Self::Item: IntoFuture,
<Self::Item as IntoFuture>::Error == Self::Error, [src]
fn buffer_unordered(self, amt: usize) -> BufferUnordered<Self> where
Self::Item: IntoFuture,
<Self::Item as IntoFuture>::Error == Self::Error, [src]An adaptor for creating a buffered list of pending futures (unordered). Read more
fn merge<S>(self, other: S) -> Merge<Self, S> where
S: Stream<Error = Self::Error>, [src]
fn merge<S>(self, other: S) -> Merge<Self, S> where
S: Stream<Error = Self::Error>, [src]functionality provided by select now
An adapter for merging the output of two streams. Read more
fn zip<S>(self, other: S) -> Zip<Self, S> where
S: Stream<Error = Self::Error>, [src]
fn zip<S>(self, other: S) -> Zip<Self, S> where
S: Stream<Error = Self::Error>, [src]An adapter for zipping two streams together. Read more
fn chain<S>(self, other: S) -> Chain<Self, S> where
S: Stream<Item = Self::Item, Error = Self::Error>, [src]
fn chain<S>(self, other: S) -> Chain<Self, S> where
S: Stream<Item = Self::Item, Error = Self::Error>, [src]Adapter for chaining two stream. Read more
fn chunks(self, capacity: usize) -> Chunks<Self>[src]
fn chunks(self, capacity: usize) -> Chunks<Self>[src]An adaptor for chunking up items of the stream inside a vector. Read more
fn select<S>(self, other: S) -> Select<Self, S> where
S: Stream<Item = Self::Item, Error = Self::Error>, [src]
fn select<S>(self, other: S) -> Select<Self, S> where
S: Stream<Item = Self::Item, Error = Self::Error>, [src]Creates a stream that selects the next element from either this stream or the provided one, whichever is ready first. Read more
fn forward<S>(self, sink: S) -> Forward<Self, S> where
S: Sink<SinkItem = Self::Item>,
Self::Error: From<<S as Sink>::SinkError>, [src]
fn forward<S>(self, sink: S) -> Forward<Self, S> where
S: Sink<SinkItem = Self::Item>,
Self::Error: From<<S as Sink>::SinkError>, [src]A future that completes after the given stream has been fully processed into the sink, including flushing. Read more
fn split(self) -> (SplitSink<Self>, SplitStream<Self>) where
Self: Sink, [src]
fn split(self) -> (SplitSink<Self>, SplitStream<Self>) where
Self: Sink, [src]Splits this Stream + Sink object into separate Stream and Sink
objects. Read more
fn inspect<F>(self, f: F) -> Inspect<Self, F> where
F: FnMut(&Self::Item), [src]
fn inspect<F>(self, f: F) -> Inspect<Self, F> where
F: FnMut(&Self::Item), [src]Do something with each item of this stream, afterwards passing it on. Read more
fn inspect_err<F>(self, f: F) -> InspectErr<Self, F> where
F: FnMut(&Self::Error), [src]
fn inspect_err<F>(self, f: F) -> InspectErr<Self, F> where
F: FnMut(&Self::Error), [src]Do something with the error of this stream, afterwards passing it on. Read more
impl<W> Write for Compat<W> where
W: AsyncWrite + Unpin, [src]
impl<W> Write for Compat<W> where
W: AsyncWrite + Unpin, [src]pub fn write(&mut self, buf: &[u8]) -> Result<usize, Error>[src]
pub fn write(&mut self, buf: &[u8]) -> Result<usize, Error>[src]Write a buffer into this writer, returning how many bytes were written. Read more
pub fn flush(&mut self) -> Result<(), Error>[src]
pub fn flush(&mut self) -> Result<(), Error>[src]Flush this output stream, ensuring that all intermediately buffered contents reach their destination. Read more
fn is_write_vectored(&self) -> bool[src]
fn is_write_vectored(&self) -> bool[src]can_vector)Determines if this Writer has an efficient write_vectored
implementation. Read more
fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>1.0.0[src]
fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>1.0.0[src]Attempts to write an entire buffer into this writer. Read more
fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>[src]
fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>[src]write_all_vectored)Attempts to write multiple buffers into this writer. Read more
impl<T> Copy for Compat<T> where
T: Copy, [src]
T: Copy,
Auto Trait Implementations
impl<T> RefUnwindSafe for Compat<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for Compat<T> where
T: Send,
T: Send,
impl<T> Sync for Compat<T> where
T: Sync,
T: Sync,
impl<T> Unpin for Compat<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for Compat<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<R> AsyncRead01CompatExt for R where
R: AsyncRead, [src]
impl<R> AsyncRead01CompatExt for R where
R: AsyncRead, [src]impl<W> AsyncWrite01CompatExt for W where
W: AsyncWrite, [src]
impl<W> AsyncWrite01CompatExt for W where
W: AsyncWrite, [src]fn compat(self) -> Compat01As03<Self>ⓘNotable traits for Compat01As03<Fut>
impl<Fut> Future for Compat01As03<Fut> where
Fut: Future, type Output = Result<<Fut as Future>::Item, <Fut as Future>::Error>;[src]
fn compat(self) -> Compat01As03<Self>ⓘNotable traits for Compat01As03<Fut>
impl<Fut> Future for Compat01As03<Fut> where
Fut: Future, type Output = Result<<Fut as Future>::Item, <Fut as Future>::Error>;[src]Converts a tokio-io AsyncWrite into a futures-io 0.3
AsyncWrite. Read more
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<Ex> Executor01CompatExt for Ex where
Ex: Executor<Compat<UnitError<FutureObj<'static, ()>>>> + Clone + Send + 'static, [src]
impl<Ex> Executor01CompatExt for Ex where
Ex: Executor<Compat<UnitError<FutureObj<'static, ()>>>> + Clone + Send + 'static, [src]impl<Fut> Future01CompatExt for Fut where
Fut: Future, [src]
impl<Fut> Future01CompatExt for Fut where
Fut: Future, [src]fn compat(self) -> Compat01As03<Self>ⓘNotable traits for Compat01As03<Fut>
impl<Fut> Future for Compat01As03<Fut> where
Fut: Future, type Output = Result<<Fut as Future>::Item, <Fut as Future>::Error>;[src]
fn compat(self) -> Compat01As03<Self>ⓘNotable traits for Compat01As03<Fut>
impl<Fut> Future for Compat01As03<Fut> where
Fut: Future, type Output = Result<<Fut as Future>::Item, <Fut as Future>::Error>;[src]Converts a futures 0.1
Future<Item = T, Error = E>
into a futures 0.3
Future<Output = Result<T, E>>. Read more
impl<F> IntoFuture for F where
F: Future, [src]
impl<F> IntoFuture for F where
F: Future, [src]impl<R> ReadBytesExt for R where
R: Read + ?Sized,
impl<R> ReadBytesExt for R where
R: Read + ?Sized, fn read_u8(&mut self) -> Result<u8, Error>
fn read_u8(&mut self) -> Result<u8, Error>Reads an unsigned 8 bit integer from the underlying reader. Read more
fn read_i8(&mut self) -> Result<i8, Error>
fn read_i8(&mut self) -> Result<i8, Error>Reads a signed 8 bit integer from the underlying reader. Read more
fn read_u16<T>(&mut self) -> Result<u16, Error> where
T: ByteOrder,
fn read_u16<T>(&mut self) -> Result<u16, Error> where
T: ByteOrder, Reads an unsigned 16 bit integer from the underlying reader. Read more
fn read_i16<T>(&mut self) -> Result<i16, Error> where
T: ByteOrder,
fn read_i16<T>(&mut self) -> Result<i16, Error> where
T: ByteOrder, Reads a signed 16 bit integer from the underlying reader. Read more
fn read_u24<T>(&mut self) -> Result<u32, Error> where
T: ByteOrder,
fn read_u24<T>(&mut self) -> Result<u32, Error> where
T: ByteOrder, Reads an unsigned 24 bit integer from the underlying reader. Read more
fn read_i24<T>(&mut self) -> Result<i32, Error> where
T: ByteOrder,
fn read_i24<T>(&mut self) -> Result<i32, Error> where
T: ByteOrder, Reads a signed 24 bit integer from the underlying reader. Read more
fn read_u32<T>(&mut self) -> Result<u32, Error> where
T: ByteOrder,
fn read_u32<T>(&mut self) -> Result<u32, Error> where
T: ByteOrder, Reads an unsigned 32 bit integer from the underlying reader. Read more
fn read_i32<T>(&mut self) -> Result<i32, Error> where
T: ByteOrder,
fn read_i32<T>(&mut self) -> Result<i32, Error> where
T: ByteOrder, Reads a signed 32 bit integer from the underlying reader. Read more
fn read_u48<T>(&mut self) -> Result<u64, Error> where
T: ByteOrder,
fn read_u48<T>(&mut self) -> Result<u64, Error> where
T: ByteOrder, Reads an unsigned 48 bit integer from the underlying reader. Read more
fn read_i48<T>(&mut self) -> Result<i64, Error> where
T: ByteOrder,
fn read_i48<T>(&mut self) -> Result<i64, Error> where
T: ByteOrder, Reads a signed 48 bit integer from the underlying reader. Read more
fn read_u64<T>(&mut self) -> Result<u64, Error> where
T: ByteOrder,
fn read_u64<T>(&mut self) -> Result<u64, Error> where
T: ByteOrder, Reads an unsigned 64 bit integer from the underlying reader. Read more
fn read_i64<T>(&mut self) -> Result<i64, Error> where
T: ByteOrder,
fn read_i64<T>(&mut self) -> Result<i64, Error> where
T: ByteOrder, Reads a signed 64 bit integer from the underlying reader. Read more
fn read_u128<T>(&mut self) -> Result<u128, Error> where
T: ByteOrder,
fn read_u128<T>(&mut self) -> Result<u128, Error> where
T: ByteOrder, Reads an unsigned 128 bit integer from the underlying reader. Read more
fn read_i128<T>(&mut self) -> Result<i128, Error> where
T: ByteOrder,
fn read_i128<T>(&mut self) -> Result<i128, Error> where
T: ByteOrder, Reads a signed 128 bit integer from the underlying reader. Read more
fn read_uint<T>(&mut self, nbytes: usize) -> Result<u64, Error> where
T: ByteOrder,
fn read_uint<T>(&mut self, nbytes: usize) -> Result<u64, Error> where
T: ByteOrder, Reads an unsigned n-bytes integer from the underlying reader. Read more
fn read_int<T>(&mut self, nbytes: usize) -> Result<i64, Error> where
T: ByteOrder,
fn read_int<T>(&mut self, nbytes: usize) -> Result<i64, Error> where
T: ByteOrder, Reads a signed n-bytes integer from the underlying reader. Read more
fn read_uint128<T>(&mut self, nbytes: usize) -> Result<u128, Error> where
T: ByteOrder,
fn read_uint128<T>(&mut self, nbytes: usize) -> Result<u128, Error> where
T: ByteOrder, Reads an unsigned n-bytes integer from the underlying reader.
fn read_int128<T>(&mut self, nbytes: usize) -> Result<i128, Error> where
T: ByteOrder,
fn read_int128<T>(&mut self, nbytes: usize) -> Result<i128, Error> where
T: ByteOrder, Reads a signed n-bytes integer from the underlying reader.
fn read_f32<T>(&mut self) -> Result<f32, Error> where
T: ByteOrder,
fn read_f32<T>(&mut self) -> Result<f32, Error> where
T: ByteOrder, Reads a IEEE754 single-precision (4 bytes) floating point number from the underlying reader. Read more
fn read_f64<T>(&mut self) -> Result<f64, Error> where
T: ByteOrder,
fn read_f64<T>(&mut self) -> Result<f64, Error> where
T: ByteOrder, Reads a IEEE754 double-precision (8 bytes) floating point number from the underlying reader. Read more
fn read_u16_into<T>(&mut self, dst: &mut [u16]) -> Result<(), Error> where
T: ByteOrder,
fn read_u16_into<T>(&mut self, dst: &mut [u16]) -> Result<(), Error> where
T: ByteOrder, Reads a sequence of unsigned 16 bit integers from the underlying reader. Read more
fn read_u32_into<T>(&mut self, dst: &mut [u32]) -> Result<(), Error> where
T: ByteOrder,
fn read_u32_into<T>(&mut self, dst: &mut [u32]) -> Result<(), Error> where
T: ByteOrder, Reads a sequence of unsigned 32 bit integers from the underlying reader. Read more
fn read_u64_into<T>(&mut self, dst: &mut [u64]) -> Result<(), Error> where
T: ByteOrder,
fn read_u64_into<T>(&mut self, dst: &mut [u64]) -> Result<(), Error> where
T: ByteOrder, Reads a sequence of unsigned 64 bit integers from the underlying reader. Read more
fn read_u128_into<T>(&mut self, dst: &mut [u128]) -> Result<(), Error> where
T: ByteOrder,
fn read_u128_into<T>(&mut self, dst: &mut [u128]) -> Result<(), Error> where
T: ByteOrder, Reads a sequence of unsigned 128 bit integers from the underlying reader. Read more
fn read_i8_into(&mut self, dst: &mut [i8]) -> Result<(), Error>
fn read_i8_into(&mut self, dst: &mut [i8]) -> Result<(), Error>Reads a sequence of signed 8 bit integers from the underlying reader. Read more
fn read_i16_into<T>(&mut self, dst: &mut [i16]) -> Result<(), Error> where
T: ByteOrder,
fn read_i16_into<T>(&mut self, dst: &mut [i16]) -> Result<(), Error> where
T: ByteOrder, Reads a sequence of signed 16 bit integers from the underlying reader. Read more
fn read_i32_into<T>(&mut self, dst: &mut [i32]) -> Result<(), Error> where
T: ByteOrder,
fn read_i32_into<T>(&mut self, dst: &mut [i32]) -> Result<(), Error> where
T: ByteOrder, Reads a sequence of signed 32 bit integers from the underlying reader. Read more
fn read_i64_into<T>(&mut self, dst: &mut [i64]) -> Result<(), Error> where
T: ByteOrder,
fn read_i64_into<T>(&mut self, dst: &mut [i64]) -> Result<(), Error> where
T: ByteOrder, Reads a sequence of signed 64 bit integers from the underlying reader. Read more
fn read_i128_into<T>(&mut self, dst: &mut [i128]) -> Result<(), Error> where
T: ByteOrder,
fn read_i128_into<T>(&mut self, dst: &mut [i128]) -> Result<(), Error> where
T: ByteOrder, Reads a sequence of signed 128 bit integers from the underlying reader. Read more
fn read_f32_into<T>(&mut self, dst: &mut [f32]) -> Result<(), Error> where
T: ByteOrder,
fn read_f32_into<T>(&mut self, dst: &mut [f32]) -> Result<(), Error> where
T: ByteOrder, Reads a sequence of IEEE754 single-precision (4 bytes) floating point numbers from the underlying reader. Read more
fn read_f32_into_unchecked<T>(&mut self, dst: &mut [f32]) -> Result<(), Error> where
T: ByteOrder,
fn read_f32_into_unchecked<T>(&mut self, dst: &mut [f32]) -> Result<(), Error> where
T: ByteOrder, please use read_f32_into instead
DEPRECATED. Read more
impl<St> Stream01CompatExt for St where
St: Stream, [src]
impl<St> Stream01CompatExt for St where
St: Stream, [src]fn compat(self) -> Compat01As03<Self>ⓘNotable traits for Compat01As03<Fut>
impl<Fut> Future for Compat01As03<Fut> where
Fut: Future, type Output = Result<<Fut as Future>::Item, <Fut as Future>::Error>;[src]
fn compat(self) -> Compat01As03<Self>ⓘNotable traits for Compat01As03<Fut>
impl<Fut> Future for Compat01As03<Fut> where
Fut: Future, type Output = Result<<Fut as Future>::Item, <Fut as Future>::Error>;[src]Converts a futures 0.1
Stream<Item = T, Error = E>
into a futures 0.3
Stream<Item = Result<T, E>>. Read more
impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, [src]type Owned = T
type Owned = TThe resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn to_owned(&self) -> T[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)[src]
pub fn clone_into(&self, target: &mut T)[src]🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<W> WriteBytesExt for W where
W: Write + ?Sized,
impl<W> WriteBytesExt for W where
W: Write + ?Sized, fn write_u8(&mut self, n: u8) -> Result<(), Error>
fn write_u8(&mut self, n: u8) -> Result<(), Error>Writes an unsigned 8 bit integer to the underlying writer. Read more
fn write_i8(&mut self, n: i8) -> Result<(), Error>
fn write_i8(&mut self, n: i8) -> Result<(), Error>Writes a signed 8 bit integer to the underlying writer. Read more
fn write_u16<T>(&mut self, n: u16) -> Result<(), Error> where
T: ByteOrder,
fn write_u16<T>(&mut self, n: u16) -> Result<(), Error> where
T: ByteOrder, Writes an unsigned 16 bit integer to the underlying writer. Read more
fn write_i16<T>(&mut self, n: i16) -> Result<(), Error> where
T: ByteOrder,
fn write_i16<T>(&mut self, n: i16) -> Result<(), Error> where
T: ByteOrder, Writes a signed 16 bit integer to the underlying writer. Read more
fn write_u24<T>(&mut self, n: u32) -> Result<(), Error> where
T: ByteOrder,
fn write_u24<T>(&mut self, n: u32) -> Result<(), Error> where
T: ByteOrder, Writes an unsigned 24 bit integer to the underlying writer. Read more
fn write_i24<T>(&mut self, n: i32) -> Result<(), Error> where
T: ByteOrder,
fn write_i24<T>(&mut self, n: i32) -> Result<(), Error> where
T: ByteOrder, Writes a signed 24 bit integer to the underlying writer. Read more
fn write_u32<T>(&mut self, n: u32) -> Result<(), Error> where
T: ByteOrder,
fn write_u32<T>(&mut self, n: u32) -> Result<(), Error> where
T: ByteOrder, Writes an unsigned 32 bit integer to the underlying writer. Read more
fn write_i32<T>(&mut self, n: i32) -> Result<(), Error> where
T: ByteOrder,
fn write_i32<T>(&mut self, n: i32) -> Result<(), Error> where
T: ByteOrder, Writes a signed 32 bit integer to the underlying writer. Read more
fn write_u48<T>(&mut self, n: u64) -> Result<(), Error> where
T: ByteOrder,
fn write_u48<T>(&mut self, n: u64) -> Result<(), Error> where
T: ByteOrder, Writes an unsigned 48 bit integer to the underlying writer. Read more
fn write_i48<T>(&mut self, n: i64) -> Result<(), Error> where
T: ByteOrder,
fn write_i48<T>(&mut self, n: i64) -> Result<(), Error> where
T: ByteOrder, Writes a signed 48 bit integer to the underlying writer. Read more
fn write_u64<T>(&mut self, n: u64) -> Result<(), Error> where
T: ByteOrder,
fn write_u64<T>(&mut self, n: u64) -> Result<(), Error> where
T: ByteOrder, Writes an unsigned 64 bit integer to the underlying writer. Read more
fn write_i64<T>(&mut self, n: i64) -> Result<(), Error> where
T: ByteOrder,
fn write_i64<T>(&mut self, n: i64) -> Result<(), Error> where
T: ByteOrder, Writes a signed 64 bit integer to the underlying writer. Read more
fn write_u128<T>(&mut self, n: u128) -> Result<(), Error> where
T: ByteOrder,
fn write_u128<T>(&mut self, n: u128) -> Result<(), Error> where
T: ByteOrder, Writes an unsigned 128 bit integer to the underlying writer.
fn write_i128<T>(&mut self, n: i128) -> Result<(), Error> where
T: ByteOrder,
fn write_i128<T>(&mut self, n: i128) -> Result<(), Error> where
T: ByteOrder, Writes a signed 128 bit integer to the underlying writer.
fn write_uint<T>(&mut self, n: u64, nbytes: usize) -> Result<(), Error> where
T: ByteOrder,
fn write_uint<T>(&mut self, n: u64, nbytes: usize) -> Result<(), Error> where
T: ByteOrder, Writes an unsigned n-bytes integer to the underlying writer. Read more
fn write_int<T>(&mut self, n: i64, nbytes: usize) -> Result<(), Error> where
T: ByteOrder,
fn write_int<T>(&mut self, n: i64, nbytes: usize) -> Result<(), Error> where
T: ByteOrder, Writes a signed n-bytes integer to the underlying writer. Read more
fn write_uint128<T>(&mut self, n: u128, nbytes: usize) -> Result<(), Error> where
T: ByteOrder,
fn write_uint128<T>(&mut self, n: u128, nbytes: usize) -> Result<(), Error> where
T: ByteOrder, Writes an unsigned n-bytes integer to the underlying writer. Read more
fn write_int128<T>(&mut self, n: i128, nbytes: usize) -> Result<(), Error> where
T: ByteOrder,
fn write_int128<T>(&mut self, n: i128, nbytes: usize) -> Result<(), Error> where
T: ByteOrder, Writes a signed n-bytes integer to the underlying writer. Read more