Struct Deferred<TResult>
Handle to read data of a promise.
Namespace: UnityEngine .Promise
Assembly: solution.dll
Syntax
public struct Deferred<TResult>
Type Parameters
Name | Description |
---|---|
TResult | Type of the result this deferred retrieves from its Promise<TResult>. |
Properties
Name | Description |
---|---|
current |
Gets the index of the current step of the promise. |
error | The exception that prevented the handled promise to be fulfilled if it has been rejected. |
is |
A flag to determine if the handled promise has been fulfilled or rejected. |
is |
A flag to determine if the handled promise has been fulfilled. |
result | The result of the async operation if the handled promise could be fulfilled. |
total |
Gets the number of steps of the promise. |
Methods
Name | Description |
---|---|
Get |
Gets the progression of the promise. |
Release() | Resets the handled promise in order to recycle it. |
Wait() | Gets the yield instruction related to the handled promise. |
Operators
Name | Description |
---|---|
implicit operator Deferred(Deferred<TResult>) | Implicitly converts the Deferred<TResult> into a classic Deferred. Useful if the only thing you need to know is whether or not the promise is fulfill or not (ignoring the result). |