[−][src]Struct futures::future::Shared
A future that is cloneable and can be polled in multiple threads.
Use Future::shared()
method to convert any future into a Shared
future.
Methods
impl<F> Shared<F> where
F: Future,
[src][−]
F: Future,
pub fn peek(&self) -> Option<Result<SharedItem<F::Item>, SharedError<F::Error>>>
[src][−]
If any clone of this Shared
has completed execution, returns its result immediately
without blocking. Otherwise, returns None without triggering the work represented by
this Shared
.
Trait Implementations
impl<F> Future for Shared<F> where
F: Future,
[src][+]
F: Future,
impl<F> Debug for Shared<F> where
F: Future + Debug,
F::Item: Debug,
F::Error: Debug,
[src][+]
F: Future + Debug,
F::Item: Debug,
F::Error: Debug,
impl<F> Drop for Shared<F> where
F: Future,
[src][+]
F: Future,
impl<F> Clone for Shared<F> where
F: Future,
[src][+]
F: Future,
Auto Trait Implementations
impl<F> Unpin for Shared<F>
impl<F> Send for Shared<F> where
F: Send,
<F as Future>::Error: Send + Sync,
<F as Future>::Item: Send + Sync,
F: Send,
<F as Future>::Error: Send + Sync,
<F as Future>::Item: Send + Sync,
impl<F> Sync for Shared<F> where
F: Send,
<F as Future>::Error: Send + Sync,
<F as Future>::Item: Send + Sync,
F: Send,
<F as Future>::Error: Send + Sync,
<F as Future>::Item: Send + Sync,
impl<F> !UnwindSafe for Shared<F>
impl<F> !RefUnwindSafe for Shared<F>
Blanket Implementations
impl<F> IntoFuture for F where
F: Future,
[src][+]
F: Future,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> Into<U> for T where
U: From<T>,
[src][+]
U: From<T>,
impl<T> From<T> for T
[src][+]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src][+]
T: 'static + ?Sized,
impl<T> ToOwned for T where
T: Clone,
[src][+]
T: Clone,