Extended Class
EventLoopFuture
extension EventLoopFuture
Topics
Operators
static func & (EventLoopFuture<Value>, EventLoopFuture<Value>) -> EventLoopFuture<Value>Returns the result of performing a bitwise AND operation on the two given futuresstatic func &= (inout EventLoopFuture<Value>, EventLoopFuture<Value>)Stores the result of performing a bitwise AND operation on the two given futures in the left-hand-side variablestatic func * (EventLoopFuture<Value>, EventLoopFuture<Value>) -> EventLoopFuture<Value>Multiplies two futures and produces their productstatic func *= (inout EventLoopFuture<Value>, EventLoopFuture<Value>)Multiplies two futures and stores the result in the left-hand-side variablestatic +(_:_:)Adds two futures and produces their sumstatic +=(_:_:)Adds two futures and stores the result in the left-hand-side variablestatic -(_:_:)Subtracts one future from another and produces their differencestatic -=(_:_:)Subtracts the second future from the first and stores the difference in the left-hand-side variablestatic func / (EventLoopFuture<Value>, EventLoopFuture<Value>) -> EventLoopFuture<Value>Returns the quotient of dividing the first future by the secondstatic func < (EventLoopFuture<Value>, EventLoopFuture<some BinaryInteger>) -> EventLoopFuture<Bool>Returns a Boolean value indicating whether the value of the first argument is less than that of the second argumentstatic func ^ (EventLoopFuture<Value>, EventLoopFuture<Value>) -> EventLoopFuture<Value>Returns the result of performing a bitwise XOR operation on the two given futuresstatic func > (EventLoopFuture<Value>, EventLoopFuture<some BinaryInteger>) -> EventLoopFuture<Bool>Returns a Boolean value indicating whether the value of the first argument is greater than that of the second argumentstatic func | (EventLoopFuture<Value>, EventLoopFuture<Value>) -> EventLoopFuture<Value>Returns the result of performing a bitwise OR operation on the two given futuresstatic func % (EventLoopFuture<Value>, EventLoopFuture<Value>) -> EventLoopFuture<Value>Returns the remainder of dividing the first future by the secondstatic func >= (EventLoopFuture<Value>, EventLoopFuture<some BinaryInteger>) -> EventLoopFuture<Bool>Returns a Boolean value indicating whether the value of the first argument is greater than or equal to that of the second argumentstatic func <= (EventLoopFuture<Value>, EventLoopFuture<some BinaryInteger>) -> EventLoopFuture<Bool>Returns a Boolean value indicating whether the value of the first argument is less than or equal to that of the second argumentstatic func %= (inout EventLoopFuture<Value>, EventLoopFuture<Value>)Divides the first future by the second and stores the remainder in the left-hand-side variablestatic func /= (inout EventLoopFuture<Value>, EventLoopFuture<Value>)Divides the first future by the second and stores the quotient in the left-hand-side variablestatic func |= (inout EventLoopFuture<Value>, EventLoopFuture<Value>)Stores the result of performing a bitwise OR operation on the two given futures in the left-hand-side variablestatic func ^= (inout EventLoopFuture<Value>, EventLoopFuture<Value>)Stores the result of performing a bitwise XOR operation on the two given futures in the left-hand-side variablestatic func << (EventLoopFuture<Value>, EventLoopFuture<some BinaryInteger>) -> EventLoopFuture<Value>Returns the result of shifting a future’s binary representation the specified number of digits to the leftstatic func >> (EventLoopFuture<Value>, EventLoopFuture<some BinaryInteger>) -> EventLoopFuture<Value>Returns the result of shifting a future’s binary representation the specified number of digits to the rightstatic func >>= (inout EventLoopFuture<Value>, EventLoopFuture<some BinaryInteger>)Stores the result of shifting a future’s binary representation the specified number of digits to the right in the left-hand-side variablestatic func <<= (inout EventLoopFuture<Value>, EventLoopFuture<some BinaryInteger>)Stores the result of shifting a future’s binary representation the specified number of digits to the left in the left-hand-side variablestatic func ~ (EventLoopFuture<Value>) -> EventLoopFuture<Value>Returns the result of performing a bitwise NOT operation on the given future
Instance Methods
func flatMapAlways<NewValue>(file: StaticString, line: UInt, (Result<Value, any Error>) -> EventLoopFuture<NewValue>) -> EventLoopFuture<NewValue>When the currentEventLoopFuturereceives any result, run the provided callback, which will provide a newEventLoopFuture. Essentially combines the behaviors of.always(_:)and.flatMap(file:line:_:).func flatMapEach(on:_:)Calls a closure, which returns anEventLoopFuture, on each element in a sequence that is wrapped by anEventLoopFuture. No results from each future are expected.func flatMapEachCompact<Result>(on: any EventLoop, (Value.Element) -> EventLoopFuture<Result?>) -> EventLoopFuture<[Result]>Calls a closure, which returns anEventLoopFuture<Optional>, on each element in a sequence that is wrapped by anEventLoopFuture.func flatMapEachCompactThrowing<Result>((Value.Element) throws -> Result?) -> EventLoopFuture<[Result]>Calls a closure, which returns anOptional, on each element in the sequence that is wrapped by anEventLoopFuture.func flatMapEachThrowing<Result>((Value.Element) throws -> Result) -> EventLoopFuture<[Result]>Calls a closure on each element in the sequence that is wrapped by anEventLoopFuture.func `guard`((Value) -> Bool, else: @autoclosure () -> any Error) -> EventLoopFuture<Value>Guards that the future’s value satisfies the callback’s condition or fails with the given error.func mapEach(_:)Gets the value of a key path for each element in the sequence that is wrapped by anEventLoopFuture.func mapEachCompact(_:)Gets the optional value of a key path for each element in the sequence that is wrapped by anEventLoopFuture.func mapEachFlat(_:)Gets the collection value of a key path for each element in the sequence that is wrapped by anEventLoopFuture, combining the results into a single result collection.func nonempty<E>(orError: @autoclosure () -> E) -> EventLoopFuture<Value>Checks that the future’s value (if any) returnsfalsefor.isEmpty. If the check fails, the provided error is thrown.func nonemptyFlatMap<NewValue>((Value) -> EventLoopFuture<NewValue>) -> EventLoopFuture<NewValue>Checks that the future’s value (if any) returnsfalsefor.isEmpty. If the check fails, a new future with an empty array as its value is returned. Otherwise, the provided normalflatMap()callback is invoked. The callback’s returned future must have a value type that is anArrayor aRangeReplaceableCollection.func nonemptyFlatMap<NewValue>(or: @autoclosure () -> NewValue, (Value) -> EventLoopFuture<NewValue>) -> EventLoopFuture<NewValue>Checks that the future’s value (if any) returnsfalsefor.isEmpty. If the check fails, a new future with the provided alternate value is returned. Otherwise, the provided normalflatMap()callback is invoked.func nonemptyFlatMap<NewValue>(orFlat: @autoclosure () -> EventLoopFuture<NewValue>, (Value) -> EventLoopFuture<NewValue>) -> EventLoopFuture<NewValue>Checks that the future’s value (if any) returnsfalsefor.isEmpty. If the check fails, the provided alternate future is returned. Otherwise, the provided normalflatMap()callback is invoked.func nonemptyFlatMapThrowing<NewValue>((Value) throws -> NewValue) -> EventLoopFuture<NewValue>Checks that the future’s value (if any) returnsfalsefor.isEmpty. If the check fails, a new future with an empty array as its value is returned. Otherwise, the provided normalflatMapThrowing()callback is invoked. The callback’s return type must be anArrayor aRangeReplaceableCollection.func nonemptyFlatMapThrowing<NewValue>(or: @autoclosure () -> NewValue, (Value) throws -> NewValue) -> EventLoopFuture<NewValue>Checks that the future’s value (if any) returnsfalsefor.isEmpty. If the check fails, a new future with the provided alternate value is returned. Otherwise, the provided normalflatMapThrowing()callback is invoked.func nonemptyMap<NewValue>((Value) -> NewValue) -> EventLoopFuture<NewValue>Checks that the future’s value (if any) returnsfalsefor.isEmpty. If the check fails, a new future with an empty array as its value is returned. Otherwise, the provided normalmap()callback is invoked. The callback’s return type must be anArrayor aRangeReplaceableCollection.func nonemptyMap<NewValue>(or: @autoclosure () -> NewValue, (Value) -> NewValue) -> EventLoopFuture<NewValue>Checks that the future’s value (if any) returnsfalsefor.isEmpty. If the check fails, a new future with the provided alternate value is returned. Otherwise, the provided normalmap()callback is invoked.func optionalFlatMap(_:)Calls a closure on an optional value in anEventLoopFutureif it exists.func optionalFlatMapThrowing<Wrapped, Result>((Wrapped) throws -> Result?) -> EventLoopFuture<Result?>Calls a throwing closure on an optional value in anEventLoopFutureif it exists.func optionalMap<Wrapped, Result>((Wrapped) -> Result?) -> EventLoopFuture<Result?>Calls a closure on an optional value that is wrapped in anEventLoopFutureif it exists.func sequencedFlatMapEach(_:)An overload ofsequencedFlatMapEach(_:)which returns aVoidfuture instead of[Void]when the result type of the transform closure isVoid.func sequencedFlatMapEachCompact<Result>((Value.Element) -> EventLoopFuture<Result?>) -> EventLoopFuture<[Result]>Variant ofsequencedFlatMapEach(_:)which providescompactMap()semantics by allowing result values to benil. Such results are not included in the output array.func transform(to:)Maps the current future to contain the new type. Errors are carried over, successful (expected) results are transformed into the given instance.func tryFlatMap<NewValue>(file: StaticString, line: UInt, (Value) throws -> EventLoopFuture<NewValue>) -> EventLoopFuture<NewValue>
Type Methods
static func whenTheySucceed<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T>(EventLoopFuture<A>, EventLoopFuture<B>, EventLoopFuture<C>, EventLoopFuture<D>, EventLoopFuture<E>, EventLoopFuture<F>, EventLoopFuture<G>, EventLoopFuture<H>, EventLoopFuture<I>, EventLoopFuture<J>, EventLoopFuture<K>, EventLoopFuture<L>, EventLoopFuture<M>, EventLoopFuture<N>, EventLoopFuture<O>, EventLoopFuture<P>, EventLoopFuture<Q>, EventLoopFuture<R>, EventLoopFuture<S>, EventLoopFuture<T>, file: StaticString, line: UInt) -> EventLoopFuture<(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)>whenTheySucceed(_:_:file:line:)of order 20.static func whenTheySucceed<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S>(EventLoopFuture<A>, EventLoopFuture<B>, EventLoopFuture<C>, EventLoopFuture<D>, EventLoopFuture<E>, EventLoopFuture<F>, EventLoopFuture<G>, EventLoopFuture<H>, EventLoopFuture<I>, EventLoopFuture<J>, EventLoopFuture<K>, EventLoopFuture<L>, EventLoopFuture<M>, EventLoopFuture<N>, EventLoopFuture<O>, EventLoopFuture<P>, EventLoopFuture<Q>, EventLoopFuture<R>, EventLoopFuture<S>, file: StaticString, line: UInt) -> EventLoopFuture<(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S)>whenTheySucceed(_:_:file:line:)of order 19.static func whenTheySucceed<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R>(EventLoopFuture<A>, EventLoopFuture<B>, EventLoopFuture<C>, EventLoopFuture<D>, EventLoopFuture<E>, EventLoopFuture<F>, EventLoopFuture<G>, EventLoopFuture<H>, EventLoopFuture<I>, EventLoopFuture<J>, EventLoopFuture<K>, EventLoopFuture<L>, EventLoopFuture<M>, EventLoopFuture<N>, EventLoopFuture<O>, EventLoopFuture<P>, EventLoopFuture<Q>, EventLoopFuture<R>, file: StaticString, line: UInt) -> EventLoopFuture<(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R)>whenTheySucceed(_:_:file:line:)of order 18.static func whenTheySucceed<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q>(EventLoopFuture<A>, EventLoopFuture<B>, EventLoopFuture<C>, EventLoopFuture<D>, EventLoopFuture<E>, EventLoopFuture<F>, EventLoopFuture<G>, EventLoopFuture<H>, EventLoopFuture<I>, EventLoopFuture<J>, EventLoopFuture<K>, EventLoopFuture<L>, EventLoopFuture<M>, EventLoopFuture<N>, EventLoopFuture<O>, EventLoopFuture<P>, EventLoopFuture<Q>, file: StaticString, line: UInt) -> EventLoopFuture<(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q)>whenTheySucceed(_:_:file:line:)of order 17.static func whenTheySucceed<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P>(EventLoopFuture<A>, EventLoopFuture<B>, EventLoopFuture<C>, EventLoopFuture<D>, EventLoopFuture<E>, EventLoopFuture<F>, EventLoopFuture<G>, EventLoopFuture<H>, EventLoopFuture<I>, EventLoopFuture<J>, EventLoopFuture<K>, EventLoopFuture<L>, EventLoopFuture<M>, EventLoopFuture<N>, EventLoopFuture<O>, EventLoopFuture<P>, file: StaticString, line: UInt) -> EventLoopFuture<(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)>whenTheySucceed(_:_:file:line:)of order 16.static func whenTheySucceed<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O>(EventLoopFuture<A>, EventLoopFuture<B>, EventLoopFuture<C>, EventLoopFuture<D>, EventLoopFuture<E>, EventLoopFuture<F>, EventLoopFuture<G>, EventLoopFuture<H>, EventLoopFuture<I>, EventLoopFuture<J>, EventLoopFuture<K>, EventLoopFuture<L>, EventLoopFuture<M>, EventLoopFuture<N>, EventLoopFuture<O>, file: StaticString, line: UInt) -> EventLoopFuture<(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)>whenTheySucceed(_:_:file:line:)of order 15.static func whenTheySucceed<A, B, C, D, E, F, G, H, I, J, K, L, M, N>(EventLoopFuture<A>, EventLoopFuture<B>, EventLoopFuture<C>, EventLoopFuture<D>, EventLoopFuture<E>, EventLoopFuture<F>, EventLoopFuture<G>, EventLoopFuture<H>, EventLoopFuture<I>, EventLoopFuture<J>, EventLoopFuture<K>, EventLoopFuture<L>, EventLoopFuture<M>, EventLoopFuture<N>, file: StaticString, line: UInt) -> EventLoopFuture<(A, B, C, D, E, F, G, H, I, J, K, L, M, N)>whenTheySucceed(_:_:file:line:)of order 14.static func whenTheySucceed<A, B, C, D, E, F, G, H, I, J, K, L, M>(EventLoopFuture<A>, EventLoopFuture<B>, EventLoopFuture<C>, EventLoopFuture<D>, EventLoopFuture<E>, EventLoopFuture<F>, EventLoopFuture<G>, EventLoopFuture<H>, EventLoopFuture<I>, EventLoopFuture<J>, EventLoopFuture<K>, EventLoopFuture<L>, EventLoopFuture<M>, file: StaticString, line: UInt) -> EventLoopFuture<(A, B, C, D, E, F, G, H, I, J, K, L, M)>whenTheySucceed(_:_:file:line:)of order 13.static func whenTheySucceed<A, B, C, D, E, F, G, H, I, J, K, L>(EventLoopFuture<A>, EventLoopFuture<B>, EventLoopFuture<C>, EventLoopFuture<D>, EventLoopFuture<E>, EventLoopFuture<F>, EventLoopFuture<G>, EventLoopFuture<H>, EventLoopFuture<I>, EventLoopFuture<J>, EventLoopFuture<K>, EventLoopFuture<L>, file: StaticString, line: UInt) -> EventLoopFuture<(A, B, C, D, E, F, G, H, I, J, K, L)>whenTheySucceed(_:_:file:line:)of order 12.static func whenTheySucceed<A, B, C, D, E, F, G, H, I, J, K>(EventLoopFuture<A>, EventLoopFuture<B>, EventLoopFuture<C>, EventLoopFuture<D>, EventLoopFuture<E>, EventLoopFuture<F>, EventLoopFuture<G>, EventLoopFuture<H>, EventLoopFuture<I>, EventLoopFuture<J>, EventLoopFuture<K>, file: StaticString, line: UInt) -> EventLoopFuture<(A, B, C, D, E, F, G, H, I, J, K)>whenTheySucceed(_:_:file:line:)of order 11.static func whenTheySucceed<A, B, C, D, E, F, G, H, I, J>(EventLoopFuture<A>, EventLoopFuture<B>, EventLoopFuture<C>, EventLoopFuture<D>, EventLoopFuture<E>, EventLoopFuture<F>, EventLoopFuture<G>, EventLoopFuture<H>, EventLoopFuture<I>, EventLoopFuture<J>, file: StaticString, line: UInt) -> EventLoopFuture<(A, B, C, D, E, F, G, H, I, J)>whenTheySucceed(_:_:file:line:)of order 10.static func whenTheySucceed<A, B, C, D, E, F, G, H, I>(EventLoopFuture<A>, EventLoopFuture<B>, EventLoopFuture<C>, EventLoopFuture<D>, EventLoopFuture<E>, EventLoopFuture<F>, EventLoopFuture<G>, EventLoopFuture<H>, EventLoopFuture<I>, file: StaticString, line: UInt) -> EventLoopFuture<(A, B, C, D, E, F, G, H, I)>whenTheySucceed(_:_:file:line:)of order 9.static func whenTheySucceed<A, B, C, D, E, F, G, H>(EventLoopFuture<A>, EventLoopFuture<B>, EventLoopFuture<C>, EventLoopFuture<D>, EventLoopFuture<E>, EventLoopFuture<F>, EventLoopFuture<G>, EventLoopFuture<H>, file: StaticString, line: UInt) -> EventLoopFuture<(A, B, C, D, E, F, G, H)>whenTheySucceed(_:_:file:line:)of order 8.static func whenTheySucceed<A, B, C, D, E, F, G>(EventLoopFuture<A>, EventLoopFuture<B>, EventLoopFuture<C>, EventLoopFuture<D>, EventLoopFuture<E>, EventLoopFuture<F>, EventLoopFuture<G>, file: StaticString, line: UInt) -> EventLoopFuture<(A, B, C, D, E, F, G)>whenTheySucceed(_:_:file:line:)of order 7.static func whenTheySucceed<A, B, C, D, E, F>(EventLoopFuture<A>, EventLoopFuture<B>, EventLoopFuture<C>, EventLoopFuture<D>, EventLoopFuture<E>, EventLoopFuture<F>, file: StaticString, line: UInt) -> EventLoopFuture<(A, B, C, D, E, F)>whenTheySucceed(_:_:file:line:)of order 6.static func whenTheySucceed<A, B, C, D, E>(EventLoopFuture<A>, EventLoopFuture<B>, EventLoopFuture<C>, EventLoopFuture<D>, EventLoopFuture<E>, file: StaticString, line: UInt) -> EventLoopFuture<(A, B, C, D, E)>whenTheySucceed(_:_:file:line:)of order 5.static func whenTheySucceed<A, B, C, D>(EventLoopFuture<A>, EventLoopFuture<B>, EventLoopFuture<C>, EventLoopFuture<D>, file: StaticString, line: UInt) -> EventLoopFuture<(A, B, C, D)>whenTheySucceed(_:_:file:line:)of order 4.static func whenTheySucceed<A, B, C>(EventLoopFuture<A>, EventLoopFuture<B>, EventLoopFuture<C>, file: StaticString, line: UInt) -> EventLoopFuture<(A, B, C)>whenTheySucceed(_:_:file:line:)of order 3.static func whenTheySucceed<A, B>(EventLoopFuture<A>, EventLoopFuture<B>, file: StaticString, line: UInt) -> EventLoopFuture<(A, B)>Returns a newEventLoopFuturethat succeeds only if all of the provided fs succeed. The newEventLoopFuturewill contain all of the values fulfilled by the fs.