pub struct Session {
pub id: SessionId,
pub name: String,
pub dirpath: PathBuf,
}
Expand description
A Tmux session.
Fields§
§id: SessionId
Session identifier, e.g. $3
.
name: String
Name of the session.
dirpath: PathBuf
Working directory of the session.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Session
impl<'de> Deserialize<'de> for Session
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 Session
impl FromStr for Session
Source§fn from_str(input: &str) -> Result<Self, Self::Err>
fn from_str(input: &str) -> Result<Self, Self::Err>
Parse a string containing tmux session status into a new Session
.
This returns a Result<Session, Error>
as this call can obviously
fail if provided an invalid format.
The expected format of the tmux status is
$1:'pytorch':/Users/graelo/dl/pytorch
$2:'rust':/Users/graelo/rust
$3:'server: $~':/Users/graelo/swift
$4:'tmux-hacking':/Users/graelo/tmux
This status line is obtained with
tmux list-sessions -F "#{session_id}:'#{session_name}':#{session_path}"
For definitions, look at Session
type and the tmux man page for
definitions.
impl Eq for Session
impl StructuralPartialEq for Session
Auto Trait Implementations§
impl Freeze for Session
impl RefUnwindSafe for Session
impl Send for Session
impl Sync for Session
impl Unpin for Session
impl UnwindSafe for Session
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