Skip to main content

FormatVariable

Enum FormatVariable 

Source
pub enum FormatVariable {
Show 20 variants SessionName, SessionWindows, SessionAttached, SessionWidth, SessionHeight, WindowIndex, WindowId, WindowName, WindowRawFlags, WindowPanes, WindowWidth, WindowHeight, WindowLayout, WindowActive, WindowLastFlag, PaneIndex, PaneId, PaneActive, PaneWidth, PaneHeight,
}
Expand description

A supported format variable name.

Variants§

§

SessionName

The session name.

§

SessionWindows

The number of windows in the session.

§

SessionAttached

The number of clients attached to the session.

§

SessionWidth

The session width in columns.

§

SessionHeight

The session height in rows.

§

WindowIndex

The window index within the session.

§

WindowId

The stable window identifier, rendered with an @ prefix.

§

WindowName

The window name, or an empty string when unnamed.

§

WindowRawFlags

The derived active or last-window marker.

§

WindowPanes

The number of panes in the window.

§

WindowWidth

The window width in columns.

§

WindowHeight

The window height in rows.

§

WindowLayout

The window layout name.

§

WindowActive

Whether the window is active, rendered as 1 or 0.

§

WindowLastFlag

Whether the window is the last window, rendered as 1 or 0.

§

PaneIndex

The pane index within the window.

§

PaneId

The stable pane identifier, rendered with a % prefix.

§

PaneActive

Whether the pane is active, rendered as 1 or 0.

§

PaneWidth

The pane width in columns.

§

PaneHeight

The pane height in rows.

Implementations§

Source§

impl FormatVariable

Source

pub fn from_name(name: &str) -> Option<Self>

Parses a supported format variable name.

Source

pub const fn name(self) -> &'static str

Returns the canonical supported variable name.

Trait Implementations§

Source§

impl Clone for FormatVariable

Source§

fn clone(&self) -> FormatVariable

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for FormatVariable

Source§

impl Debug for FormatVariable

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for FormatVariable

Source§

impl Hash for FormatVariable

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for FormatVariable

Source§

fn eq(&self, other: &FormatVariable) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for FormatVariable

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.