ITrackablePromise.cs 659 B

12345678910111213141516171819202122
  1. // Copyright (c) 2025 TerraByte Inc.
  2. //
  3. // A non-generic interface that allows the PromiseManager to track and
  4. // tick promises without needing to know their specific result type.
  5. using UnityEngine.Scripting;
  6. namespace Terra.Arbitrator.Promises
  7. {
  8. /// <summary>
  9. /// Represents a promise that can be ticked by the PromiseManager.
  10. /// </summary>
  11. [Preserve]
  12. public interface ITrackablePromise
  13. {
  14. /// <summary>
  15. /// Executes pending callbacks if the promise is settled.
  16. /// </summary>
  17. /// <returns>True if the promise is settled (resolved or rejected), otherwise false.</returns>
  18. bool Tick();
  19. }
  20. }