pub struct Window {
pub id: WindowId,
pub index: u16,
pub is_active: bool,
pub layout: String,
pub name: String,
pub sessions: Vec<String>,
}
Expand description
A Tmux window.
Fields
id: WindowId
Window identifier, e.g. @3
.
index: u16
Index of the Window in the Session.
is_active: bool
Describes whether the Window is active.
layout: String
Describes how panes are laid out in the Window.
name: String
Name of the Window.
sessions: Vec<String>
Name of Sessions to which this Window is attached.
Implementations
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Window
impl<'de> Deserialize<'de> for Window
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl FromStr for Window
impl FromStr for Window
sourcefn from_str(input: &str) -> Result<Self, Self::Err>
fn from_str(input: &str) -> Result<Self, Self::Err>
Parse a string containing the tmux window status into a new Window
.
This returns a Result<Window, Error>
as this call can obviously
fail if provided an invalid format.
The expected format of the tmux status is
@1:0:true:035d,334x85,0,0{167x85,0,0,1,166x85,168,0[166x48,168,0,2,166x36,168,49,3]}:'ignite':'pytorch'
@2:1:false:4438,334x85,0,0[334x41,0,0{167x41,0,0,4,166x41,168,0,5},334x43,0,42{167x43,0,42,6,166x43,168,42,7}]:'dates-attn':'pytorch'
@3:2:false:9e8b,334x85,0,0{167x85,0,0,8,166x85,168,0,9}:'th-bits':'pytorch'
@4:3:false:64ef,334x85,0,0,10:'docker-pytorch':'pytorch'
@5:0:true:64f0,334x85,0,0,11:'ben':'rust'
@6:1:false:64f1,334x85,0,0,12:'pyo3':'rust'
@7:2:false:64f2,334x85,0,0,13:'mdns-repeater':'rust'
@8:0:true:64f3,334x85,0,0,14:'combine':'swift'
@9:0:false:64f4,334x85,0,0,15:'copyrat':'tmux-hacking'
@10:1:false:ae3a,334x85,0,0[334x48,0,0,17,334x36,0,49{175x36,0,49,18,158x36,176,49,19}]:'mytui-app':'tmux-hacking'
@11:2:true:e2e2,334x85,0,0{175x85,0,0,20,158x85,176,0[158x42,176,0,21,158x42,176,43,27]}:'tmux-backup':'tmux-hacking'
This status line is obtained with
tmux list-windows -a -F "#{window_id}:#{window_index}:#{?window_active,true,false}:#{window_layout}:'#{window_name}':'#{window_linked_sessions_list}'"
For definitions, look at Window
type and the tmux man page for
definitions.
impl Eq for Window
impl StructuralEq for Window
impl StructuralPartialEq for Window
Auto Trait Implementations
impl RefUnwindSafe for Window
impl Send for Window
impl Sync for Window
impl Unpin for Window
impl UnwindSafe for Window
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more