#[non_exhaustive]pub enum OptionScope {
Server,
Session,
Window,
Pane,
}Expand description
Which table an option primarily lives in.
§Examples
use libtmux::{OptionScope, option_schema};
// The scope says which handle can set an option, which is not guessable
// from the name: `mouse` is per-session, and `exit-empty` is server-wide.
assert!(option_schema("mouse").is_some_and(|o| o.accepts(OptionScope::Session)));
assert!(option_schema("exit-empty").is_some_and(|o| o.accepts(OptionScope::Server)));
// Some options live in two tables at once, and tmux takes a write at
// either. Asking for one scope would have to pick, and picking is wrong.
let remain = option_schema("remain-on-exit").expect("a documented option");
assert_eq!(remain.scopes(), [OptionScope::Window, OptionScope::Pane]);Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Server
Server options, read with tmux’s -s.
Session
Session options.
Window
Window options, read with tmux’s -w.
Pane
Pane options, read with tmux’s -p.
Trait Implementations§
Source§impl Clone for OptionScope
impl Clone for OptionScope
impl Copy for OptionScope
Source§impl Debug for OptionScope
impl Debug for OptionScope
impl Eq for OptionScope
Source§impl PartialEq for OptionScope
impl PartialEq for OptionScope
impl StructuralPartialEq for OptionScope
Auto Trait Implementations§
impl Freeze for OptionScope
impl RefUnwindSafe for OptionScope
impl Send for OptionScope
impl Sync for OptionScope
impl Unpin for OptionScope
impl UnsafeUnpin for OptionScope
impl UnwindSafe for OptionScope
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more