//===----------------------------------------------------------------------===// // // This source file is part of the SwiftNIO open source project // // Copyright (c) 2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information // See CONTRIBUTORS.txt for the list of SwiftNIO project authors // // SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// extension EventLoopFuture { @preconcurrency @inlinable @available(*, deprecated, message: "Please don't pass file:line:, there's no point.") public func flatMap( file: StaticString = #fileID, line: UInt = #line, _ callback: @escaping @Sendable (Value) -> EventLoopFuture ) -> EventLoopFuture { self.flatMap(callback) } @preconcurrency @inlinable @available(*, deprecated, message: "Please don't pass file:line:, there's no point.") public func flatMapThrowing( file: StaticString = #fileID, line: UInt = #line, _ callback: @escaping @Sendable (Value) throws -> NewValue ) -> EventLoopFuture { self.flatMapThrowing(callback) } @inlinable @available(*, deprecated, message: "Please don't pass file:line:, there's no point.") public func flatMapErrorThrowing( file: StaticString = #fileID, line: UInt = #line, _ callback: @escaping @Sendable (Error) throws -> Value ) -> EventLoopFuture { self.flatMapErrorThrowing(callback) } @inlinable @available(*, deprecated, message: "Please don't pass file:line:, there's no point.") public func map( file: StaticString = #fileID, line: UInt = #line, _ callback: @escaping @Sendable (Value) -> (NewValue) ) -> EventLoopFuture { self.map(callback) } @inlinable @available(*, deprecated, message: "Please don't pass file:line:, there's no point.") public func flatMapError( file: StaticString = #fileID, line: UInt = #line, _ callback: @escaping @Sendable (Error) -> EventLoopFuture ) -> EventLoopFuture where Value: Sendable { self.flatMapError(callback) } @preconcurrency @inlinable @available(*, deprecated, message: "Please don't pass file:line:, there's no point.") public func flatMapResult( file: StaticString = #fileID, line: UInt = #line, _ body: @escaping @Sendable (Value) -> Result ) -> EventLoopFuture { self.flatMapResult(body) } @preconcurrency @inlinable @available(*, deprecated, message: "Please don't pass file:line:, there's no point.") public func recover( file: StaticString = #fileID, line: UInt = #line, _ callback: @escaping @Sendable (Error) -> Value ) -> EventLoopFuture { self.recover(callback) } @preconcurrency @inlinable @available(*, deprecated, message: "Please don't pass file:line:, there's no point.") public func and( _ other: EventLoopFuture, file: StaticString = #fileID, line: UInt = #line ) -> EventLoopFuture<(Value, OtherValue)> { self.and(other) } @preconcurrency @inlinable @available(*, deprecated, message: "Please don't pass file:line:, there's no point.") public func and( value: OtherValue, file: StaticString = #fileID, line: UInt = #line ) -> EventLoopFuture<(Value, OtherValue)> { self.and(value: value) } }