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

ScopeError.into_operation

Take the operation's own error, when the operation is what failed.

Source and package
Qualified name
libtmux::error::scoped::ScopeError::into_operation
Module
error.scoped
Declared in
ScopeError
Package
libtmux
Source
crates/libtmux/src/error/scoped.rs
impl<T, E> ScopeError<T, E> pub fn into_operation(self) -> Option<E>

Description#

None for a creation failure, where the operation never ran, and for a cleanup-only failure, where it succeeded.

Examples#

use libtmux::ScopeError;
let failed: ScopeError<(), _> = ScopeError::Operation("no route");
assert_eq!(failed.into_operation(), Some("no route"));
Type parameters
Esc

Type to search.

Reference previewOpen reference