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

control.ControlEvents

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

View as Markdown

Module
control
Package
libtmux
Source
crates/libtmux/src/control.rs
struct control.ControlEvents
structoverload [source]
structoverload [source]
struct control.ControlEvents

Receives tmux notifications and terminal connection errors.

This is a Stream<Item = Result<Event, Error>>. Notifications arrive in order. A connection failure follows all buffered notifications as one Err; subsequent polls return None. A normal tmux %exit arrives as Event::Exit and is followed by None after cleanup succeeds. EOF without %exit is crate::ControlModeErrorKind::Closed . Server::shutdown may discard notifications still waiting for delivery so an unread stream cannot prevent executor shutdown.

Exhaustion waits for connection cleanup. Self::shutdown closes early and returns any terminal error the stream has not already delivered.

Events are buffered, and a consumer that stops reading eventually stops the connection reading from tmux, which is the backpressure tmux already expects from a slow client. During normal operation nothing is dropped; commands wait instead. Drop this handle to opt out of events entirely and the connection runs on.

2 declared, 0 inherited

Members

  • next_event method Return the next notification or terminal error, then None.
  • shutdown method End the connection and report how it went.
Esc

Type to search.