Struct futures::compat::Compat

source ·
pub struct Compat<T> { /* private fields */ }
Available on crate feature compat only.
Expand description

Converts a futures 0.3 TryFuture or TryStream into a futures 0.1 Future or Stream.

Implementations§

source§

impl<T> Compat<T>

source

pub fn new(inner: T) -> Compat<T>

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.

source

pub fn get_ref(&self) -> &T

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

source

pub fn get_mut(&mut self) -> &mut T

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

source

pub fn into_inner(self) -> T

Returns the inner item.

Trait Implementations§

source§

impl<R> AsyncRead for Compat<R>
where R: AsyncRead + Unpin,

source§

unsafe fn prepare_uninitialized_buffer(&self, buf: &mut [u8]) -> bool

Prepares an uninitialized buffer to be safe to pass to read. Returns true if the supplied buffer was zeroed out. Read more
source§

fn poll_read(&mut self, buf: &mut [u8]) -> Result<Async<usize>, Error>

Attempt to read from the AsyncRead into buf. Read more
source§

fn read_buf<B>(&mut self, buf: &mut B) -> Result<Async<usize>, Error>
where B: BufMut, Self: Sized,

Pull some bytes from this source into the specified BufMut, returning how many bytes were read. Read more
source§

impl<W> AsyncWrite for Compat<W>
where W: AsyncWrite + Unpin,

source§

fn shutdown(&mut self) -> Result<Async<()>, Error>

Initiates or attempts to shut down this writer, returning success when the I/O connection has completely shut down. Read more
source§

fn poll_write(&mut self, buf: &[u8]) -> Result<Async<usize>, Error>

Attempt to write bytes from buf into the object. Read more
source§

fn poll_flush(&mut self) -> Result<Async<()>, Error>

Attempt to flush the object, ensuring that any buffered data reach their destination. Read more
source§

fn write_buf<B>(&mut self, buf: &mut B) -> Result<Async<usize>, Error>
where B: Buf, Self: Sized,

Write a Buf into this value, returning how many bytes were written. Read more
source§

impl<T> Clone for Compat<T>
where T: Clone,

source§

fn clone(&self) -> Compat<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T> Debug for Compat<T>
where T: Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<Sp, Fut> Executor<Fut> for Compat<Sp>
where &'a Sp: for<'a> Spawn, Fut: Future<Item = (), Error = ()> + Send + 'static,

source§

fn execute(&self, future: Fut) -> Result<(), ExecuteError<Fut>>

Spawns a future to run on this Executor, typically in the “background”. Read more
source§

impl<Fut> Future for Compat<Fut>
where Fut: TryFuture + Unpin,

§

type Item = <Fut as TryFuture>::Ok

The type of value that this future will resolved with if it is successful.
§

type Error = <Fut as TryFuture>::Error

The type of error that this future will resolve with if it fails in a normal fashion.
source§

fn poll( &mut self ) -> Result<Async<<Compat<Fut> as Future>::Item>, <Compat<Fut> as Future>::Error>

Query this future to see if its value has become available, registering interest if it is not. Read more
source§

fn wait(self) -> Result<Self::Item, Self::Error>
where Self: Sized,

Block the current thread until this future is resolved. Read more
source§

fn map<F, U>(self, f: F) -> Map<Self, F>
where F: FnOnce(Self::Item) -> U, Self: Sized,

Map this future’s result to a different type, returning a new future of the resulting type. Read more
source§

fn map_err<F, E>(self, f: F) -> MapErr<Self, F>
where F: FnOnce(Self::Error) -> E, Self: Sized,

Map this future’s error to a different error, returning a new future. Read more
source§

fn from_err<E>(self) -> FromErr<Self, E>
where E: From<Self::Error>, Self: Sized,

Map this future’s error to any error implementing From for this future’s Error, returning a new future. Read more
source§

fn then<F, B>(self, f: F) -> Then<Self, B, F>
where F: FnOnce(Result<Self::Item, Self::Error>) -> B, B: IntoFuture, Self: Sized,

Chain on a computation for when a future finished, passing the result of the future to the provided closure f. Read more
source§

fn and_then<F, B>(self, f: F) -> AndThen<Self, B, F>
where F: FnOnce(Self::Item) -> B, B: IntoFuture<Error = Self::Error>, Self: Sized,

Execute another future after this one has resolved successfully. Read more
source§

fn or_else<F, B>(self, f: F) -> OrElse<Self, B, F>
where F: FnOnce(Self::Error) -> B, B: IntoFuture<Item = Self::Item>, Self: Sized,

Execute another future if this one resolves with an error. Read more
source§

fn select<B>(self, other: B) -> Select<Self, <B as IntoFuture>::Future>
where B: IntoFuture<Item = Self::Item, Error = Self::Error>, Self: Sized,

Waits for either one of two futures to complete. Read more
source§

fn select2<B>(self, other: B) -> Select2<Self, <B as IntoFuture>::Future>
where B: IntoFuture, Self: Sized,

Waits for either one of two differently-typed futures to complete. Read more
source§

fn join<B>(self, other: B) -> Join<Self, <B as IntoFuture>::Future>
where B: IntoFuture<Error = Self::Error>, Self: Sized,

Joins the result of two futures, waiting for them both to complete. Read more
source§

fn join3<B, C>( self, b: B, c: C ) -> Join3<Self, <B as IntoFuture>::Future, <C as IntoFuture>::Future>
where B: IntoFuture<Error = Self::Error>, C: IntoFuture<Error = Self::Error>, Self: Sized,

Same as join, but with more futures.
source§

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 B: IntoFuture<Error = Self::Error>, C: IntoFuture<Error = Self::Error>, D: IntoFuture<Error = Self::Error>, Self: Sized,

Same as join, but with more futures.
source§

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 B: IntoFuture<Error = Self::Error>, C: IntoFuture<Error = Self::Error>, D: IntoFuture<Error = Self::Error>, E: IntoFuture<Error = Self::Error>, Self: Sized,

Same as join, but with more futures.
source§

fn into_stream(self) -> IntoStream<Self>
where Self: Sized,

Convert this future into a single element stream. Read more
source§

fn fuse(self) -> Fuse<Self>
where Self: Sized,

Fuse a future such that poll will never again be called once it has completed. Read more
source§

fn inspect<F>(self, f: F) -> Inspect<Self, F>
where F: FnOnce(&Self::Item), Self: Sized,

Do something with the item of a future, passing it on. Read more
source§

fn shared(self) -> Shared<Self>
where Self: Sized,

Create a cloneable handle to this future where all handles will resolve to the same result. Read more
source§

impl<R> Read for Compat<R>
where R: AsyncRead + Unpin,

source§

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
1.36.0 · source§

fn read_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> Result<usize, Error>

Like read, except that it reads into a slice of buffers. Read more
source§

fn is_read_vectored(&self) -> bool

🔬This is a nightly-only experimental API. (can_vector)
Determines if this Reader has an efficient read_vectored implementation. Read more
1.0.0 · source§

fn read_to_end(&mut self, buf: &mut Vec<u8>) -> Result<usize, Error>

Read all bytes until EOF in this source, placing them into buf. Read more
1.0.0 · source§

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
1.6.0 · source§

fn read_exact(&mut self, buf: &mut [u8]) -> Result<(), Error>

Read the exact number of bytes required to fill buf. Read more
source§

fn read_buf(&mut self, buf: BorrowedCursor<'_>) -> Result<(), Error>

🔬This is a nightly-only experimental API. (read_buf)
Pull some bytes from this source into the specified buffer. Read more
source§

fn read_buf_exact(&mut self, cursor: BorrowedCursor<'_>) -> Result<(), Error>

🔬This is a nightly-only experimental API. (read_buf)
Read the exact number of bytes required to fill cursor. Read more
1.0.0 · source§

fn by_ref(&mut self) -> &mut Self
where Self: Sized,

Creates a “by reference” adaptor for this instance of Read. Read more
1.0.0 · source§

fn bytes(self) -> Bytes<Self>
where Self: Sized,

Transforms this Read instance to an Iterator over its bytes. Read more
1.0.0 · source§

fn chain<R>(self, next: R) -> Chain<Self, R>
where R: Read, Self: Sized,

Creates an adapter which will chain this stream with another. Read more
1.0.0 · source§

fn take(self, limit: u64) -> Take<Self>
where Self: Sized,

Creates an adapter which will read at most limit bytes from it. Read more
source§

impl<St> Stream for Compat<St>
where St: TryStream + Unpin,

§

type Item = <St as TryStream>::Ok

The type of item this stream will yield on success.
§

type Error = <St as TryStream>::Error

The type of error this stream may generate.
source§

fn poll( &mut self ) -> Result<Async<Option<<Compat<St> as Stream>::Item>>, <Compat<St> as Stream>::Error>

Attempt to pull out the next value of this stream, returning None if the stream is finished. Read more
source§

fn wait(self) -> Wait<Self>
where Self: Sized,

Creates an iterator which blocks the current thread until each item of this stream is resolved. Read more
source§

fn into_future(self) -> StreamFuture<Self>
where Self: Sized,

Converts this stream into a Future. Read more
source§

fn map<U, F>(self, f: F) -> Map<Self, F>
where F: FnMut(Self::Item) -> U, Self: Sized,

Converts a stream of type T to a stream of type U. Read more
source§

fn map_err<U, F>(self, f: F) -> MapErr<Self, F>
where F: FnMut(Self::Error) -> U, Self: Sized,

Converts a stream of error type T to a stream of error type U. Read more
source§

fn filter<F>(self, f: F) -> Filter<Self, F>
where F: FnMut(&Self::Item) -> bool, Self: Sized,

Filters the values produced by this stream according to the provided predicate. Read more
source§

fn filter_map<F, B>(self, f: F) -> FilterMap<Self, F>
where F: FnMut(Self::Item) -> Option<B>, Self: Sized,

Filters the values produced by this stream while simultaneously mapping them to a different type. Read more
source§

fn then<F, U>(self, f: F) -> Then<Self, F, U>
where F: FnMut(Result<Self::Item, Self::Error>) -> U, U: IntoFuture, Self: Sized,

Chain on a computation for when a value is ready, passing the resulting item to the provided closure f. Read more
source§

fn and_then<F, U>(self, f: F) -> AndThen<Self, F, U>
where F: FnMut(Self::Item) -> U, U: IntoFuture<Error = Self::Error>, Self: Sized,

Chain on a computation for when a value is ready, passing the successful results to the provided closure f. Read more
source§

fn or_else<F, U>(self, f: F) -> OrElse<Self, F, U>
where F: FnMut(Self::Error) -> U, U: IntoFuture<Item = Self::Item>, Self: Sized,

Chain on a computation for when an error happens, passing the erroneous result to the provided closure f. Read more
source§

fn collect(self) -> Collect<Self>
where Self: Sized,

Collect all of the values of this stream into a vector, returning a future representing the result of that computation. Read more
source§

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>, Self: Sized,

Execute an accumulating computation over a stream, collecting all the values into one final result. Read more
source§

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>, Self: Sized,

Skip elements on this stream while the predicate provided resolves to true. Read more
source§

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>, Self: Sized,

Take elements from this stream while the predicate provided resolves to true. Read more
source§

fn for_each<F, U>(self, f: F) -> ForEach<Self, F, U>
where F: FnMut(Self::Item) -> U, U: IntoFuture<Item = (), Error = Self::Error>, Self: Sized,

Runs this stream to completion, executing the provided closure for each element on the stream. Read more
source§

fn from_err<E>(self) -> FromErr<Self, E>
where E: From<Self::Error>, Self: Sized,

Map this stream’s error to any error implementing From for this stream’s Error, returning a new stream. Read more
source§

fn take(self, amt: u64) -> Take<Self>
where Self: Sized,

Creates a new stream of at most amt items of the underlying stream. Read more
source§

fn skip(self, amt: u64) -> Skip<Self>
where Self: Sized,

Creates a new stream which skips amt items of the underlying stream. Read more
source§

fn fuse(self) -> Fuse<Self>
where Self: Sized,

Fuse a stream such that poll will never again be called once it has finished. Read more
source§

fn by_ref(&mut self) -> &mut Self
where Self: Sized,

Borrows a stream, rather than consuming it. Read more
source§

fn merge<S>(self, other: S) -> Merge<Self, S>
where S: Stream<Error = Self::Error>, Self: Sized,

👎Deprecated: functionality provided by select now
An adapter for merging the output of two streams. Read more
source§

fn zip<S>(self, other: S) -> Zip<Self, S>
where S: Stream<Error = Self::Error>, Self: Sized,

An adapter for zipping two streams together. Read more
source§

fn chain<S>(self, other: S) -> Chain<Self, S>
where S: Stream<Item = Self::Item, Error = Self::Error>, Self: Sized,

Adapter for chaining two stream. Read more
source§

fn peekable(self) -> Peekable<Self>
where Self: Sized,

Creates a new stream which exposes a peek method. Read more
source§

fn chunks(self, capacity: usize) -> Chunks<Self>
where Self: Sized,

An adaptor for chunking up items of the stream inside a vector. Read more
source§

fn select<S>(self, other: S) -> Select<Self, S>
where S: Stream<Item = Self::Item, Error = Self::Error>, Self: Sized,

Creates a stream that selects the next element from either this stream or the provided one, whichever is ready first. Read more
source§

fn forward<S>(self, sink: S) -> Forward<Self, S>
where S: Sink<SinkItem = Self::Item>, Self::Error: From<<S as Sink>::SinkError>, Self: Sized,

A future that completes after the given stream has been fully processed into the sink, including flushing. Read more
source§

fn inspect<F>(self, f: F) -> Inspect<Self, F>
where F: FnMut(&Self::Item), Self: Sized,

Do something with each item of this stream, afterwards passing it on. Read more
source§

fn inspect_err<F>(self, f: F) -> InspectErr<Self, F>
where F: FnMut(&Self::Error), Self: Sized,

Do something with the error of this stream, afterwards passing it on. Read more
source§

impl<W> Write for Compat<W>
where W: AsyncWrite + Unpin,

source§

fn write(&mut self, buf: &[u8]) -> Result<usize, Error>

Write a buffer into this writer, returning how many bytes were written. Read more
source§

fn flush(&mut self) -> Result<(), Error>

Flush this output stream, ensuring that all intermediately buffered contents reach their destination. Read more
1.36.0 · source§

fn write_vectored(&mut self, bufs: &[IoSlice<'_>]) -> Result<usize, Error>

Like write, except that it writes from a slice of buffers. Read more
source§

fn is_write_vectored(&self) -> bool

🔬This is a nightly-only experimental API. (can_vector)
Determines if this Writer has an efficient write_vectored implementation. Read more
1.0.0 · source§

fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>

Attempts to write an entire buffer into this writer. Read more
source§

fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>

🔬This is a nightly-only experimental API. (write_all_vectored)
Attempts to write multiple buffers into this writer. Read more
1.0.0 · source§

fn write_fmt(&mut self, fmt: Arguments<'_>) -> Result<(), Error>

Writes a formatted string into this writer, returning any error encountered. Read more
1.0.0 · source§

fn by_ref(&mut self) -> &mut Self
where Self: Sized,

Creates a “by reference” adapter for this instance of Write. Read more
source§

impl<T> Copy for Compat<T>
where T: Copy,

Auto Trait Implementations§

§

impl<T> RefUnwindSafe for Compat<T>
where T: RefUnwindSafe,

§

impl<T> Send for Compat<T>
where T: Send,

§

impl<T> Sync for Compat<T>
where T: Sync,

§

impl<T> Unpin for Compat<T>
where T: Unpin,

§

impl<T> UnwindSafe for Compat<T>
where T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<R> AsyncRead01CompatExt for R
where R: AsyncRead,

source§

fn compat(self) -> Compat01As03<Self>
where Self: Sized,

Converts a tokio-io AsyncRead into a futures-io 0.3 AsyncRead. Read more
source§

impl<W> AsyncWrite01CompatExt for W
where W: AsyncWrite,

source§

fn compat(self) -> Compat01As03<Self>
where Self: Sized,

Converts a tokio-io AsyncWrite into a futures-io 0.3 AsyncWrite. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<Ex> Executor01CompatExt for Ex
where Ex: Executor<Compat<UnitError<FutureObj<'static, ()>>>> + Clone + Send + 'static,

source§

fn compat(self) -> Executor01As03<Ex>

Converts a futures 0.1 Executor into a futures 0.3 Spawn. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<Fut> Future01CompatExt for Fut
where Fut: Future,

source§

fn compat(self) -> Compat01As03<Self>
where Self: Sized,

Converts a futures 0.1 Future<Item = T, Error = E> into a futures 0.3 Future<Output = Result<T, E>>. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<F> IntoFuture for F
where F: Future,

§

type Future = F

The future that this type can be converted into.
§

type Item = <F as Future>::Item

The item that the future may resolve with.
§

type Error = <F as Future>::Error

The error that the future may resolve with.
source§

fn into_future(self) -> F

Consumes this object and produces a future.
§

impl<R> ReadBytesExt for R
where R: Read + ?Sized,

§

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>

Reads a signed 8 bit integer from the underlying reader. Read more
§

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,

Reads a signed 16 bit integer from the underlying reader. Read more
§

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,

Reads a signed 24 bit integer from the underlying reader. Read more
§

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,

Reads a signed 32 bit integer from the underlying reader. Read more
§

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,

Reads a signed 48 bit integer from the underlying reader. Read more
§

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,

Reads a signed 64 bit integer from the underlying reader. Read more
§

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,

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,

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,

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,

Reads an unsigned n-bytes integer from the underlying reader.
§

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,

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,

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,

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,

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,

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,

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>

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,

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,

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,

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,

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,

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,

👎Deprecated since 1.2.0: please use read_f32_into instead
DEPRECATED. Read more
§

fn read_f64_into<T>(&mut self, dst: &mut [f64]) -> Result<(), Error>
where T: ByteOrder,

Reads a sequence of IEEE754 double-precision (8 bytes) floating point numbers from the underlying reader. Read more
§

fn read_f64_into_unchecked<T>(&mut self, dst: &mut [f64]) -> Result<(), Error>
where T: ByteOrder,

👎Deprecated since 1.2.0: please use read_f64_into instead
DEPRECATED. Read more
source§

impl<St> Stream01CompatExt for St
where St: Stream,

source§

fn compat(self) -> Compat01As03<Self>
where Self: Sized,

Converts a futures 0.1 Stream<Item = T, Error = E> into a futures 0.3 Stream<Item = Result<T, E>>. Read more
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<W> WriteBytesExt for W
where W: Write + ?Sized,

§

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>

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,

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,

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,

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,

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,

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,

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,

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,

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,

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,

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,

Writes an unsigned 128 bit integer to the underlying writer.
§

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,

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,

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,

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,

Writes a signed n-bytes integer to the underlying writer. Read more
§

fn write_f32<T>(&mut self, n: f32) -> Result<(), Error>
where T: ByteOrder,

Writes a IEEE754 single-precision (4 bytes) floating point number to the underlying writer. Read more
§

fn write_f64<T>(&mut self, n: f64) -> Result<(), Error>
where T: ByteOrder,

Writes a IEEE754 double-precision (8 bytes) floating point number to the underlying writer. Read more