Skip to content

Extended Class

EventLoopFuture

extension EventLoopFuture

Topics

Operators

  • &(_:_:)
    Returns the result of performing a bitwise AND operation on the two given futures
  • &=(_:_:)
    Stores the result of performing a bitwise AND operation on the two given futures in the left-hand-side variable
  • *(_:_:)
    Multiplies two futures and produces their product
  • *=(_:_:)
    Multiplies two futures and stores the result in the left-hand-side variable
  • +(_:_:)
    Adds two futures and produces their sum
  • +=(_:_:)
    Adds two futures and stores the result in the left-hand-side variable
  • -(_:_:)
    Subtracts one future from another and produces their difference
  • -=(_:_:)
    Subtracts the second future from the first and stores the difference in the left-hand-side variable
  • /(_:_:)
    Returns the quotient of dividing the first future by the second
  • <(_:_:)
    Returns a Boolean value indicating whether the value of the first argument is less than that of the second argument
  • ^(_:_:)
    Returns the result of performing a bitwise XOR operation on the two given futures
  • >(_:_:)
    Returns a Boolean value indicating whether the value of the first argument is greater than that of the second argument
  • |(_:_:)
    Returns the result of performing a bitwise OR operation on the two given futures
  • %(_:_:)
    Returns the remainder of dividing the first future by the second
  • >=(_:_:)
    Returns a Boolean value indicating whether the value of the first argument is greater than or equal to that of the second argument
  • <=(_:_:)
    Returns a Boolean value indicating whether the value of the first argument is less than or equal to that of the second argument
  • %=(_:_:)
    Divides the first future by the second and stores the remainder in the left-hand-side variable
  • /=(_:_:)
    Divides the first future by the second and stores the quotient in the left-hand-side variable
  • |=(_:_:)
    Stores the result of performing a bitwise OR operation on the two given futures in the left-hand-side variable
  • ^=(_:_:)
    Stores the result of performing a bitwise XOR operation on the two given futures in the left-hand-side variable
  • <<(_:_:)
    Returns the result of shifting a future’s binary representation the specified number of digits to the left
  • >>(_:_:)
    Returns the result of shifting a future’s binary representation the specified number of digits to the right
  • >>=(_:_:)
    Stores the result of shifting a future’s binary representation the specified number of digits to the right in the left-hand-side variable
  • <<=(_:_:)
    Stores the result of shifting a future’s binary representation the specified number of digits to the left in the left-hand-side variable
  • ~(_:)
    Returns the result of performing a bitwise NOT operation on the given future

Instance Methods

  • flatMapAlways(file:line:_:)
    When the current EventLoopFuture receives any result, run the provided callback, which will provide a new EventLoopFuture. Essentially combines the behaviors of .always(_:) and .flatMap(file:line:_:).
  • flatMapEach(on:_:)
    Calls a closure, which returns an EventLoopFuture, on each element in a sequence that is wrapped by an EventLoopFuture. No results from each future are expected.
  • flatMapEachCompact(on:_:)
    Calls a closure, which returns an EventLoopFuture<Optional>, on each element in a sequence that is wrapped by an EventLoopFuture.
  • flatMapEachCompactThrowing(_:)
    Calls a closure, which returns an Optional, on each element in the sequence that is wrapped by an EventLoopFuture.
  • flatMapEachThrowing(_:)
    Calls a closure on each element in the sequence that is wrapped by an EventLoopFuture.
  • guard(_:else:)
    Guards that the future’s value satisfies the callback’s condition or fails with the given error.
  • mapEach(_:)
    Gets the value of a key path for each element in the sequence that is wrapped by an EventLoopFuture.
  • mapEachCompact(_:)
    Gets the optional value of a key path for each element in the sequence that is wrapped by an EventLoopFuture.
  • mapEachFlat(_:)
    Gets the collection value of a key path for each element in the sequence that is wrapped by an EventLoopFuture, combining the results into a single result collection.
  • nonempty(orError:)
    Checks that the future’s value (if any) returns false for .isEmpty. If the check fails, the provided error is thrown.
  • nonemptyFlatMap(_:)
    Checks that the future’s value (if any) returns false for .isEmpty. If the check fails, a new future with an empty array as its value is returned. Otherwise, the provided normal flatMap() callback is invoked. The callback’s returned future must have a value type that is an Array or a RangeReplaceableCollection.
  • nonemptyFlatMap(or:_:)
    Checks that the future’s value (if any) returns false for .isEmpty. If the check fails, a new future with the provided alternate value is returned. Otherwise, the provided normal flatMap() callback is invoked.
  • nonemptyFlatMap(orFlat:_:)
    Checks that the future’s value (if any) returns false for .isEmpty. If the check fails, the provided alternate future is returned. Otherwise, the provided normal flatMap() callback is invoked.
  • nonemptyFlatMapThrowing(_:)
    Checks that the future’s value (if any) returns false for .isEmpty. If the check fails, a new future with an empty array as its value is returned. Otherwise, the provided normal flatMapThrowing() callback is invoked. The callback’s return type must be an Array or a RangeReplaceableCollection.
  • nonemptyFlatMapThrowing(or:_:)
    Checks that the future’s value (if any) returns false for .isEmpty. If the check fails, a new future with the provided alternate value is returned. Otherwise, the provided normal flatMapThrowing() callback is invoked.
  • nonemptyMap(_:)
    Checks that the future’s value (if any) returns false for .isEmpty. If the check fails, a new future with an empty array as its value is returned. Otherwise, the provided normal map() callback is invoked. The callback’s return type must be an Array or a RangeReplaceableCollection.
  • nonemptyMap(or:_:)
    Checks that the future’s value (if any) returns false for .isEmpty. If the check fails, a new future with the provided alternate value is returned. Otherwise, the provided normal map() callback is invoked.
  • optionalFlatMap(_:)
    Calls a closure on an optional value in an EventLoopFuture if it exists.
  • optionalFlatMapThrowing(_:)
    Calls a throwing closure on an optional value in an EventLoopFuture if it exists.
  • optionalMap(_:)
    Calls a closure on an optional value that is wrapped in an EventLoopFuture if it exists.
  • sequencedFlatMapEach(_:)
    An overload of sequencedFlatMapEach(_:) which returns a Void future instead of [Void] when the result type of the transform closure is Void.
  • sequencedFlatMapEachCompact(_:)
    Variant of sequencedFlatMapEach(_:) which provides compactMap() semantics by allowing result values to be nil. Such results are not included in the output array.
  • transform(to:)
    Maps the current future to contain the new type. Errors are carried over, successful (expected) results are transformed into the given instance.
  • tryFlatMap(file:line:_:)

Type Methods