run(resultType:body:)
Execute the given body closure on the main actor.
Declaration
static func run<T>(resultType: T.Type = T.self, body: @MainActor @Sendable () throws -> T) async rethrows -> T where T : SendableExecute the given body closure on the main actor.
static func run<T>(resultType: T.Type = T.self, body: @MainActor @Sendable () throws -> T) async rethrows -> T where T : Sendable