Struct completable_future::CompletableFuture [] [src]

pub struct CompletableFuture<V, E> { /* fields omitted */ }

A CompletableFuture is a future that you can expect a result (or error) from and chain logic on. You will need some executor to actively poll the result. Executors provided by the futures crate are usually good enough for common situations.

If you use a custom executor, be careful that don't poll the CompletableFuture after it has already completed (or errored) in previous polls. Doing so will panic your executor.

Methods

impl<V, E> CompletableFuture<V, E>
[src]

[src]

Construct a CompletableFuture.

[src]

Construct a CompletableFuture that's already completed with the value provided.

[src]

Construct a CompletableFuture that's already errored with the value provided.

[src]

Get a CompletableFutureSignal that can be used to complete or error this CompletableFuture.

Trait Implementations

impl<V, E> Future for CompletableFuture<V, E>
[src]

A successful value

An error

[src]

Attempt to resolve the future to a final value, registering the current task for wakeup if the value is not yet available. Read more

Auto Trait Implementations

impl<V, E> Send for CompletableFuture<V, E> where
    E: Send,
    V: Send

impl<V, E> Sync for CompletableFuture<V, E> where
    E: Send,
    V: Send