pub struct Pane {
pub id: PaneId,
pub index: u16,
pub is_active: bool,
pub title: String,
pub dirpath: PathBuf,
pub command: String,
}
Expand description
A Tmux pane.
Fields§
§id: PaneId
Pane identifier, e.g. %37
.
index: u16
Describes the Pane index in the Window
is_active: bool
Describes if the pane is currently active (focused).
title: String
Title of the Pane (usually defaults to the hostname)
dirpath: PathBuf
Current dirpath of the Pane
command: String
Current command executed in the Pane
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Pane
impl<'de> Deserialize<'de> for Pane
Source§fn 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
Source§impl FromStr for Pane
impl FromStr for Pane
Source§fn from_str(input: &str) -> Result<Self, Self::Err>
fn from_str(input: &str) -> Result<Self, Self::Err>
Parse a string containing tmux panes status into a new Pane
.
This returns a Result<Pane, Error>
as this call can obviously
fail if provided an invalid format.
The expected format of the tmux status is
%20:0:false:'rmbp':'nvim':/Users/graelo/code/rust/tmux-backup
%21:1:true:'rmbp':'tmux':/Users/graelo/code/rust/tmux-backup
%27:2:false:'rmbp':'man man':/Users/graelo/code/rust/tmux-backup
This status line is obtained with
tmux list-panes -F "#{pane_id}:#{pane_index}:#{?pane_active,true,false}:'#{pane_title}':'#{pane_current_command}':#{pane_current_path}"
For definitions, look at Pane
type and the tmux man page for
definitions.
impl Eq for Pane
impl StructuralPartialEq for Pane
Auto Trait Implementations§
impl Freeze for Pane
impl RefUnwindSafe for Pane
impl Send for Pane
impl Sync for Pane
impl Unpin for Pane
impl UnwindSafe for Pane
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