makeCompletedFuture(withResultOf:)

Creates and returns a new EventLoopFuture that is marked as succeeded or failed with the value returned by body.

EventLoop.swift:1216
@preconcurrency func makeCompletedFuture<Success>(withResultOf body: () throws -> Success) -> EventLoopFuture<Success> where Success : Sendable

Parameters

body

The function that is used to complete the EventLoopFuture

Returns

A completed EventLoopFuture.