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