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

tmuxq.ExactlyOneSeq

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

View as Markdown

Module
tmuxq
Package
github.com/libtmux/libtmux-go/tmux
Source
tmuxq/query.go
ExactlyOneSeq ( values : iter.Seq[T] , predicate : func(*T) bool ) → (T, error)
function [source]
function [source]
ExactlyOneSeq

ExactlyOneSeq returns a shallow copy when exactly one source-ordered sequence value is accepted by predicate. It stops pulling at the second match. If input ends with no matches, it returns the zero value of T with ErrNoMatch ; if it finds a second match, it returns the zero value of T with ErrMultipleMatches . Callers can classify either error with errors.Is. With an infinite input, ExactlyOneSeq returns only after a second match; it cannot confirm a no-match or exactly-one result without source exhaustion.

0 declared, 0 inherited

Esc

Type to search.