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
-
-
Tdeclared byAvailability<T>
-