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-rs latest

TestServer.shutdown

Stop the client executor and consume the daemon guard.

Source and package
Qualified name
libtmux::test::TestServer::shutdown
Module
test
Declared in
TestServer
Package
libtmux
Source
crates/libtmux/src/test.rs
pub async fn shutdown(mut self) -> Result< (), TestServerError >

Description#

Errors

Returns TestServerErrorKind::ShutdownFailed when executor closure, lifecycle signaling/waiting, or the blocking waiter fails. Returns TestServerErrorKind::CleanupFailed when descriptor-relative cleanup cannot be proved after lifecycle processing.

This consumes the guard, closes its shared no-start executor, and then terminates the retained foreground daemon. Escaped Server clones cannot issue later commands.

Cancel safety

Nothing is left behind, on a best-effort basis: dropped early, the guard's own forced cleanup runs; dropped once cleanup has started, a blocking task finishes it. Either way a failure goes unreported.

Examples#

let guard = libtmux::test::TestServer::new().await?;
guard.shutdown().await?;

Guides#

Pages that discuss shutdown.

Esc

Type to search.

Reference previewOpen reference