Struct gaffer::future::Promise[][src]

pub struct Promise<T> { /* fields omitted */ }
Expand description

The sending side of a promise which can be used to complete a future. If 2 promises are of the same type, they can be merged and then all the futures will be resolved with clones of the result.

Implementations

Create the sending and receiving parts of the promise.

Fulfill the promise, the future will be woken and can retrieve the result, if used on a merged Promise the merged futures will receive PromiseDropped. So prefer Promise::fulfill on mergable results.

Fulfill the promise, the future will be woken and can retrieve the result. Any merged Promises will be fulfilled at the same time

Merge another promise of the same type into this promise, the future paired with the other promise will be linked to this and will be completed when this one is fulfilled or dropped.

Trait Implementations

Executes the destructor for this type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.