Core Library0.xAPI Reference

Choose documentation 3

latest

Current version

latest
English

Early release libtmux is released, and its APIs may still change between releases. This site's structure and URLs may change too.

method libtmux-swift latest

ControlNotificationStream.contains(_:)

Returns a Boolean value that indicates whether the asynchronous sequence contains the given element.

Source and package
Qualified name
ControlNotificationStream.contains(_:)
Declared in
ControlNotificationStream
Package
libtmux-swift
contains(search: Self.Element) -> Bool

Inherited from AsyncSequence.contains(_:)

Description#

In this example, an asynchronous sequence called Counter produces Int values from 1 to 10. The contains(_:) method checks to see whether the sequence produces the value 5:

let containsFive = await Counter(howHigh: 10) .contains(5) print(containsFive) // Prints "true"

  • Parameter search: The element to find in the asynchronous sequence.
  • Returns: true if the method found the element in the asynchronous sequence; otherwise, false.
Parameters
Raises
  • any Error – Conditionally propagates errors (rethrows).

Esc

Type to search.

Reference previewOpen reference