pub struct Compat<T> { /* private fields */ }
Available on crate feature
compat
only.Expand description
Implementations§
source§impl<T> Compat<T>
impl<T> Compat<T>
sourcepub fn new(inner: T) -> Self
pub fn new(inner: T) -> Self
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.
sourcepub fn get_ref(&self) -> &T
pub fn get_ref(&self) -> &T
Get a reference to 0.3 Future, Stream, AsyncRead, or AsyncWrite object contained within.
sourcepub fn get_mut(&mut self) -> &mut T
pub fn get_mut(&mut self) -> &mut T
Get a mutable reference to 0.3 Future, Stream, AsyncRead, or AsyncWrite object contained within.
sourcepub fn into_inner(self) -> T
pub fn into_inner(self) -> T
Returns the inner item.
Trait Implementations§
source§impl<R: AsyncRead03 + Unpin> AsyncRead for Compat<R>
Available on crate feature io-compat
only.
impl<R: AsyncRead03 + Unpin> AsyncRead for Compat<R>
Available on crate feature
io-compat
only.source§impl<W: AsyncWrite03 + Unpin> AsyncWrite for Compat<W>
Available on crate feature io-compat
only.
impl<W: AsyncWrite03 + Unpin> AsyncWrite for Compat<W>
Available on crate feature
io-compat
only.source§fn shutdown(&mut self) -> Result<Async01<()>>
fn shutdown(&mut self) -> Result<Async01<()>>
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>
fn poll_write(&mut self, buf: &[u8]) -> Result<Async<usize>, Error>
Attempt to write bytes from
buf
into the object. Read moresource§impl<Fut> Future for Compat<Fut>where
Fut: TryFuture03 + Unpin,
impl<Fut> Future for Compat<Fut>where
Fut: TryFuture03 + Unpin,
source§type Item = <Fut as TryFuture>::Ok
type Item = <Fut as TryFuture>::Ok
The type of value that this future will resolved with if it is
successful.
source§type Error = <Fut as TryFuture>::Error
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) -> Poll01<Self::Item, Self::Error>
fn poll(&mut self) -> Poll01<Self::Item, Self::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,
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>
fn map<F, U>(self, f: F) -> Map<Self, F>
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>
fn map_err<F, E>(self, f: F) -> MapErr<Self, F>
Map this future’s error to a different error, returning a new future. Read more
source§fn from_err<E>(self) -> FromErr<Self, E>
fn from_err<E>(self) -> FromErr<Self, E>
Map this future’s error to any error implementing
From
for
this future’s Error
, returning a new future. Read moresource§fn then<F, B>(self, f: F) -> Then<Self, B, F>
fn then<F, B>(self, f: F) -> Then<Self, B, F>
Chain on a computation for when a future finished, passing the result of
the future to the provided closure
f
. Read moresource§fn and_then<F, B>(self, f: F) -> AndThen<Self, B, F>
fn and_then<F, B>(self, f: F) -> AndThen<Self, B, F>
Execute another future after this one has resolved successfully. Read more
source§fn or_else<F, B>(self, f: F) -> OrElse<Self, B, F>
fn or_else<F, B>(self, f: F) -> OrElse<Self, B, F>
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>
fn select<B>(self, other: B) -> Select<Self, <B as IntoFuture>::Future>
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,
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>
fn join<B>(self, other: B) -> Join<Self, <B as IntoFuture>::Future>
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>
fn join3<B, C>( self, b: B, c: C, ) -> Join3<Self, <B as IntoFuture>::Future, <C as IntoFuture>::Future>
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,
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,
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,
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,
fn fuse(self) -> Fuse<Self>where
Self: Sized,
Fuse a future such that
poll
will never again be called once it has
completed. Read moresource§fn inspect<F>(self, f: F) -> Inspect<Self, F>
fn inspect<F>(self, f: F) -> Inspect<Self, F>
Do something with the item of a future, passing it on. Read more
Create a cloneable handle to this future where all handles will resolve
to the same result. Read more
source§impl<R: AsyncRead03 + Unpin> Read for Compat<R>
Available on crate feature io-compat
only.
impl<R: AsyncRead03 + Unpin> Read for Compat<R>
Available on crate feature
io-compat
only.source§fn read(&mut self, buf: &mut [u8]) -> Result<usize>
fn read(&mut self, buf: &mut [u8]) -> Result<usize>
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>
fn read_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> Result<usize, Error>
Like
read
, except that it reads into a slice of buffers. Read moresource§fn is_read_vectored(&self) -> bool
fn is_read_vectored(&self) -> bool
🔬This is a nightly-only experimental API. (
can_vector
)1.0.0 · source§fn read_to_end(&mut self, buf: &mut Vec<u8>) -> Result<usize, Error>
fn read_to_end(&mut self, buf: &mut Vec<u8>) -> Result<usize, Error>
Reads all bytes until EOF in this source, placing them into
buf
. Read more1.0.0 · source§fn read_to_string(&mut self, buf: &mut String) -> Result<usize, Error>
fn read_to_string(&mut self, buf: &mut String) -> Result<usize, Error>
Reads all bytes until EOF in this source, appending them to
buf
. Read more1.6.0 · source§fn read_exact(&mut self, buf: &mut [u8]) -> Result<(), Error>
fn read_exact(&mut self, buf: &mut [u8]) -> Result<(), Error>
Reads the exact number of bytes required to fill
buf
. Read moresource§fn read_buf(&mut self, buf: BorrowedCursor<'_>) -> Result<(), Error>
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>
fn read_buf_exact(&mut self, cursor: BorrowedCursor<'_>) -> Result<(), Error>
🔬This is a nightly-only experimental API. (
read_buf
)Reads the exact number of bytes required to fill
cursor
. Read more1.0.0 · source§fn by_ref(&mut self) -> &mut Selfwhere
Self: Sized,
fn by_ref(&mut self) -> &mut Selfwhere
Self: Sized,
Creates a “by reference” adaptor for this instance of
Read
. Read moresource§impl<St> Stream for Compat<St>where
St: TryStream03 + Unpin,
impl<St> Stream for Compat<St>where
St: TryStream03 + Unpin,
source§fn poll(&mut self) -> Poll01<Option<Self::Item>, Self::Error>
fn poll(&mut self) -> Poll01<Option<Self::Item>, Self::Error>
Attempt to pull out the next value of this stream, returning
None
if
the stream is finished. Read moresource§fn wait(self) -> Wait<Self>where
Self: Sized,
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,
fn into_future(self) -> StreamFuture<Self>where
Self: Sized,
Converts this stream into a
Future
. Read moresource§fn filter<F>(self, f: F) -> Filter<Self, F>
fn filter<F>(self, f: F) -> Filter<Self, F>
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>
fn filter_map<F, B>(self, f: F) -> FilterMap<Self, F>
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>
fn then<F, U>(self, f: F) -> Then<Self, F, U>
Chain on a computation for when a value is ready, passing the resulting
item to the provided closure
f
. Read moresource§fn and_then<F, U>(self, f: F) -> AndThen<Self, F, U>
fn and_then<F, U>(self, f: F) -> AndThen<Self, F, U>
Chain on a computation for when a value is ready, passing the successful
results to the provided closure
f
. Read moresource§fn or_else<F, U>(self, f: F) -> OrElse<Self, F, U>
fn or_else<F, U>(self, f: F) -> OrElse<Self, F, U>
Chain on a computation for when an error happens, passing the
erroneous result to the provided closure
f
. Read moresource§fn collect(self) -> Collect<Self>where
Self: Sized,
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,
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>
fn skip_while<P, R>(self, pred: P) -> SkipWhile<Self, P, R>
Skip elements on this stream while the predicate provided resolves to
true
. Read moresource§fn take_while<P, R>(self, pred: P) -> TakeWhile<Self, P, R>
fn take_while<P, R>(self, pred: P) -> TakeWhile<Self, P, R>
Take elements from this stream while the predicate provided resolves to
true
. Read moresource§fn for_each<F, U>(self, f: F) -> ForEach<Self, F, U>
fn for_each<F, U>(self, f: F) -> ForEach<Self, F, U>
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>
fn from_err<E>(self) -> FromErr<Self, E>
Map this stream’s error to any error implementing
From
for
this stream’s Error
, returning a new stream. Read moresource§fn take(self, amt: u64) -> Take<Self>where
Self: Sized,
fn take(self, amt: u64) -> Take<Self>where
Self: Sized,
Creates a new stream of at most
amt
items of the underlying stream. Read moresource§fn skip(self, amt: u64) -> Skip<Self>where
Self: Sized,
fn skip(self, amt: u64) -> Skip<Self>where
Self: Sized,
Creates a new stream which skips
amt
items of the underlying stream. Read moresource§fn fuse(self) -> Fuse<Self>where
Self: Sized,
fn fuse(self) -> Fuse<Self>where
Self: Sized,
Fuse a stream such that
poll
will never again be called once it has
finished. Read moresource§fn by_ref(&mut self) -> &mut Selfwhere
Self: Sized,
fn by_ref(&mut self) -> &mut Selfwhere
Self: Sized,
Borrows a stream, rather than consuming it. Read more
source§fn merge<S>(self, other: S) -> Merge<Self, S>
fn merge<S>(self, other: S) -> Merge<Self, S>
👎Deprecated: functionality provided by
select
nowAn adapter for merging the output of two streams. Read more
source§fn zip<S>(self, other: S) -> Zip<Self, S>
fn zip<S>(self, other: S) -> Zip<Self, S>
An adapter for zipping two streams together. Read more
source§fn peekable(self) -> Peekable<Self>where
Self: Sized,
fn peekable(self) -> Peekable<Self>where
Self: Sized,
Creates a new stream which exposes a
peek
method. Read moresource§fn chunks(self, capacity: usize) -> Chunks<Self>where
Self: Sized,
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>
fn select<S>(self, other: S) -> Select<Self, S>
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>
fn forward<S>(self, sink: S) -> Forward<Self, S>
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>
fn inspect<F>(self, f: F) -> Inspect<Self, F>
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>
fn inspect_err<F>(self, f: F) -> InspectErr<Self, F>
Do something with the error of this stream, afterwards passing it on. Read more
source§impl<W: AsyncWrite03 + Unpin> Write for Compat<W>
Available on crate feature io-compat
only.
impl<W: AsyncWrite03 + Unpin> Write for Compat<W>
Available on crate feature
io-compat
only.source§fn write(&mut self, buf: &[u8]) -> Result<usize>
fn write(&mut self, buf: &[u8]) -> Result<usize>
Writes a buffer into this writer, returning how many bytes were written. Read more
source§fn flush(&mut self) -> Result<()>
fn flush(&mut self) -> Result<()>
Flushes this output stream, ensuring that all intermediately buffered
contents reach their destination. Read more
source§fn is_write_vectored(&self) -> bool
fn is_write_vectored(&self) -> bool
🔬This is a nightly-only experimental API. (
can_vector
)1.0.0 · source§fn 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
source§fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>
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
impl<T: Copy> Copy for Compat<T>
Auto Trait Implementations§
impl<T> Freeze for Compat<T>where
T: Freeze,
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<R> AsyncRead01CompatExt for Rwhere
R: AsyncRead,
impl<R> AsyncRead01CompatExt for Rwhere
R: AsyncRead,
source§impl<W> AsyncWrite01CompatExt for Wwhere
W: AsyncWrite,
impl<W> AsyncWrite01CompatExt for Wwhere
W: AsyncWrite,
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<Ex> Executor01CompatExt for Ex
impl<Ex> Executor01CompatExt for Ex
source§impl<Fut> Future01CompatExt for Futwhere
Fut: Future,
impl<Fut> Future01CompatExt for Futwhere
Fut: Future,
source§fn compat(self) -> Compat01As03<Self> ⓘwhere
Self: Sized,
fn compat(self) -> Compat01As03<Self> ⓘwhere
Self: Sized,
Available on crate feature
compat
only.Converts a futures 0.1
Future<Item = T, Error = E>
into a futures 0.3
Future<Output = Result<T, E>>
. Read moresource§impl<F> IntoFuture for Fwhere
F: Future,
impl<F> IntoFuture for Fwhere
F: Future,
source§fn into_future(self) -> F
fn into_future(self) -> F
Consumes this object and produces a future.
source§impl<R> ReadBytesExt for R
impl<R> ReadBytesExt for R
source§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
source§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
source§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
source§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
source§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
source§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
source§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
source§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
source§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
source§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
source§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
source§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
source§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
source§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
source§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
source§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
source§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.
source§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.
source§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
source§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
source§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
source§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
source§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
source§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
source§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
source§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
source§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
source§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
source§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
source§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
source§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,
👎Deprecated since 1.2.0: please use
read_f32_into
insteadDEPRECATED. Read more
source§impl<St> Stream01CompatExt for Stwhere
St: Stream,
impl<St> Stream01CompatExt for Stwhere
St: Stream,
source§fn compat(self) -> Compat01As03<Self> ⓘwhere
Self: Sized,
fn compat(self) -> Compat01As03<Self> ⓘwhere
Self: Sized,
Available on crate feature
compat
only.Converts a futures 0.1
Stream<Item = T, Error = E>
into a futures 0.3
Stream<Item = Result<T, E>>
. Read moresource§impl<W> WriteBytesExt for W
impl<W> WriteBytesExt for W
source§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
source§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
source§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
source§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
source§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
source§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
source§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
source§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
source§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
source§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
source§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
source§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
source§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.
source§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.
source§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
source§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
source§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
source§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