Struct futures::future::Select
[−]
[src]
#[must_use = "futures do nothing unless polled"]pub struct Select<A, B> { /* fields omitted */ }
Future for the select
combinator, waiting for one of two differently-typed
futures to complete.
This is created by the Future::select
method.
Trait Implementations
impl<A, B> Debug for Select<A, B> where
A: Debug,
B: Debug,
[src]
A: Debug,
B: Debug,
fn fmt(&self, __arg_0: &mut Formatter) -> Result<(), Error>
[src]
Formats the value using the given formatter. Read more
impl<A, B> Future for Select<A, B> where
A: Future,
B: Future,
[src]
A: Future,
B: Future,
type Item = Either<(<A as Future>::Item, B), (<B as Future>::Item, A)>
A successful value
type Error = Either<(<A as Future>::Error, B), (<B as Future>::Error, A)>
An error
fn poll(
&mut self,
cx: &mut Context
) -> Result<Async<<Select<A, B> as Future>::Item>, <Select<A, B> as Future>::Error>
[src]
&mut self,
cx: &mut Context
) -> Result<Async<<Select<A, B> as Future>::Item>, <Select<A, B> as Future>::Error>
Attempt to resolve the future to a final value, registering the current task for wakeup if the value is not yet available. Read more