Skip to content

Operator

??(_:_:)

Applies nil coalescing to a future’s optional and a concrete type.
func ?? <T>(lhs: EventLoopFuture<T?>, rhs: T) -> EventLoopFuture<T> where T : Sendable

Discussion

print(maybeFutureInt) // Future<Int>?
let futureInt = maybeFutureInt ?? 0
print(futureInt) // Future<Int>