Struct futures_util::compat::Compat01As03
source · [−]pub struct Compat01As03<T> { /* private fields */ }
Expand description
Converts a futures 0.1 Future, Stream, AsyncRead, or AsyncWrite object to a futures 0.3-compatible version,
Implementations
sourceimpl<T> Compat01As03<T>
impl<T> Compat01As03<T>
sourcepub fn new(object: T) -> Self
pub fn new(object: T) -> Self
Wraps a futures 0.1 Future, Stream, AsyncRead, or AsyncWrite object in a futures 0.3-compatible wrapper.
sourcepub fn get_ref(&self) -> &T
pub fn get_ref(&self) -> &T
Get a reference to 0.1 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.1 Future, Stream, AsyncRead or AsyncWrite object contained within.
sourcepub fn into_inner(self) -> T
pub fn into_inner(self) -> T
Consume this wrapper to return the underlying 0.1 Future, Stream, AsyncRead, or AsyncWrite object.
Trait Implementations
sourceimpl<T: Debug> Debug for Compat01As03<T>
impl<T: Debug> Debug for Compat01As03<T>
sourceimpl<Fut: Future01> Future for Compat01As03<Fut>
impl<Fut: Future01> Future for Compat01As03<Fut>
sourceimpl<St: Stream01> Stream for Compat01As03<St>
impl<St: Stream01> Stream for Compat01As03<St>
impl<T> Unpin for Compat01As03<T>
Auto Trait Implementations
impl<T> !RefUnwindSafe for Compat01As03<T>
impl<T> Send for Compat01As03<T> where
T: Send,
impl<T> !Sync for Compat01As03<T>
impl<T> !UnwindSafe for Compat01As03<T>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<F> IntoFuture for F where
F: Future,
impl<F> IntoFuture for F where
F: Future,
type Output = <F as Future>::Output
type Output = <F as Future>::Output
🔬 This is a nightly-only experimental API. (
into_future
)The output that the future will produce on completion.
type Future = F
type Future = F
🔬 This is a nightly-only experimental API. (
into_future
)Which kind of future are we turning this into?
sourcepub fn into_future(self) -> <F as IntoFuture>::Future
pub fn into_future(self) -> <F as IntoFuture>::Future
🔬 This is a nightly-only experimental API. (
into_future
)Creates a future from a value.