error.Error.kind
Rust
- Python Unavailable
- TypeScript Unavailable
- Rust
- Go Unavailable
- Java Unavailable
- .NET Unavailable
- C++ Unavailable
- Swift Unavailable
- Module
- error
- Declared in
- Error
- Package
- libtmux
- Source
- crates/libtmux/src/error/classification.rs
-
Return what this failure means for the caller.
Examples
use libtmux::ErrorKind;// The shape this exists for: use it if it is there, make it if not.let session = match server.session("work").await? {Some(session) => session,None => server.new_session("work").await?,};// And when an operation races something else removing it. The handle// is cloned because killing consumes one, which is how the crate// stops you from using a window you just destroyed.let window = session.new_window("doomed").await?;let mut stale = window.clone();window.kill().await?;let error = stale.rename("gone").await.expect_err("the window was killed");assert_eq!(error.kind(), ErrorKind::ObjectGone);assert!(error.is_object_gone());
0 declared, 0 inherited