SwiftclassJetEngine
class JetEngine.LazyPromise
Structure
What a query’s scopes step through. Every node here can be matched — see the syntax.
inherits{}
- protocolJetEngine.Future
Members 14
- deinit
deinit - field
var state: JetEngine.LazyPromise<A>.State - field
let stateLock: os.OSAllocatedUnfairLock<()> - func
flatMap<A where A1: JetEngine.Future>(on: JetEngine.TaskScheduler, _: (A) -> A1) -> JetEngine.LazyPromise<A1.Value> - func
join<A where A1: JetEngine.Future>(with: A1) -> JetEngine.LazyPromise<(A, A1.Value)> - func
map<A>(on: JetEngine.TaskScheduler, _: (A) throws -> A1) -> JetEngine.LazyPromise<A1> - func
start() -> JetEngine.Promise<A> - func
then(perform: (A) -> (), orCatchError: (Error) -> (), on: JetEngine.TaskScheduler) -> () - func
then() async throws -> A - init
JetEngine.LazyPromise.__allocating_init(on: JetEngine.TaskScheduler, perform: ((A) -> (), (Error) -> ()) -> ()) -> JetEngine.LazyPromise<A> - init
JetEngine.LazyPromise.__allocating_init(task: @Sendable () async throws -> A) -> JetEngine.LazyPromise<A> - init
JetEngine.LazyPromise<A where A: AnyObject>.init(AMSLazyPromise<A>) -> JetEngine.LazyPromise<A> - typealias
typealias Value = A - var
final var hasStarted: Bool { get }
Header
class LazyPromise<A> { enum State { case pending(any JetEngine.TaskScheduler, @Sendable (@escaping (_: A) -> (), @escaping (_: any Swift.Error) -> ()) -> ()) case started(JetEngine.Promise<A>) } struct TaskOutcome { let resolve: (_: A) -> () let reject: (_: any Swift.Error) -> () init(_: @escaping (_: A) -> (), _: @escaping (_: any Swift.Error) -> ()) } let stateLock: os.OSAllocatedUnfairLock<()> var state: JetEngine.LazyPromise<A>.State init(on: any JetEngine.TaskScheduler, perform: @escaping (@escaping (_: A) -> (), @escaping (_: any Swift.Error) -> ()) -> ()) init(task: @escaping @Sendable () async throws -> A) final var hasStarted: Swift.Bool { get } final func map<A1>(on: any JetEngine.TaskScheduler, _: @escaping (_: A) throws -> A1) -> JetEngine.LazyPromise<A1> final func join<A1>(with: A1) -> JetEngine.LazyPromise<(A, A1.Value)> where A1: JetEngine.Future final func then(perform: @escaping (_: A) -> (), orCatchError: @escaping (_: any Swift.Error) -> (), on: any JetEngine.TaskScheduler) final func then() async throws -> A final func start() -> JetEngine.Promise<A> final func flatMap<A1>(on: any JetEngine.TaskScheduler, _: @escaping (_: A) -> A1) -> JetEngine.LazyPromise<A1.Value> where A1: JetEngine.Future deinit }