AsyncLoadableProtocol

An async loadable makes it possible to fetch the content C using the async/await syntax.

  • C
  • The associated content for this loadable. This is now a concrete type, so if your loadable loads multiple values, either pass a tuple (recommended up to 2 values) or a wrapping struct.

  • Fetch the content asynchronously, instead of adding a listener, this will throw upon setFailedWithError and return the content when setDidSyncSuccessfully. Equivalent of sync()

  • Similar to fetch(), only when MMMPureLoadableProtocol/needsSync() is true. Equivalent of syncIfNeeded().