Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

ControlNotificationStream.filter(_:)

Swift
  • Python Unavailable
  • Ruby Unavailable
  • Lua Unavailable
  • TypeScript Unavailable
  • Rust Unavailable
  • Go Unavailable
  • Java Unavailable
  • .NET Unavailable
  • C++ Unavailable
  • Swift

View as Markdown

Declared in
ControlNotificationStream
Package
libtmux-swift
filter(_:) ( isIncluded : (Self.Element) async -> Bool ) → AsyncFilterSequence<Self>
methodasync
methodasync
filter(_:)

Inherited from AsyncSequence.filter(_:)

Creates an asynchronous sequence that contains, in order, the elements of the base sequence that satisfy the given predicate.

In this example, an asynchronous sequence called Counter produces Int values from 1 to 10. The filter(_:) method returns true for even values and false for odd values, thereby filtering out the odd values:

let stream = Counter(howHigh: 10) .filter { $0 % 2 == 0 } for await number in stream { print(number, terminator: " ") } // Prints "2 4 6 8 10 "

  • Parameter isIncluded: A closure that takes an element of the asynchronous sequence as its argument and returns a Boolean value that indicates whether to include the element in the filtered sequence.
  • Returns: An asynchronous sequence that contains, in order, the elements of the base sequence that satisfy the given predicate.

0 declared, 0 inherited

Esc

Type to search.