Struct PromiseAwaiter<T>
- Namespace
- MarymoorStudios.Core.Promises
- Assembly
- MarymoorStudios.Core.Promises.dll
Enables the await
keyword for Promise<T>.
public readonly struct PromiseAwaiter<T> : ICriticalNotifyCompletion, INotifyCompletion
Type Parameters
T
The type of the value produced by a successful outcome.
- Implements
- Inherited Members
Constructors
PromiseAwaiter(Promise<T>)
Constructor.
public PromiseAwaiter(Promise<T> p)
Parameters
p
Promise<T>
Properties
IsCompleted
True if the promise has been resolved successfully.
public bool IsCompleted { get; }
Property Value
Methods
GetResult()
Returns the final outcome of the awaited promise.
public T GetResult()
Returns
- T