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

Availability.as_ref

Borrow the value, keeping the reason when there is none.

Source and package
Qualified name
libtmux::snapshot::Availability::as_ref
Module
snapshot
Declared in
Availability
Package
libtmux
Source
crates/libtmux/src/snapshot.rs
impl<T> Availability<T> pub const fn as_ref(&self) -> Availability<&T>

Examples#

use libtmux::{Availability, TmuxText};
let owned = Availability::Available(TmuxText::from("copy-mode"));
assert_eq!(owned.as_ref().available(), Some(&TmuxText::from("copy-mode")));
Type parameters
Esc

Type to search.

Reference previewOpen reference