Struct tmux_lib::client::Client

source ·
pub struct Client {
    pub session_name: String,
    pub last_session_name: String,
}
Expand description

A Tmux client.

Fields

session_name: String

The current session.

last_session_name: String

The last session.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Deserialize this value from the given Serde deserializer. Read more

Parse a string containing client information into a new Client.

This returns a Result<Client, Error> as this call can obviously fail if provided an invalid format.

The expected format of the tmux response is

name-of-current-session:name-of-last-session

This status line is obtained with

tmux display-message -p -F "'#{client_session}':'#{client_last_session}'"

For definitions, look at Pane type and the tmux man page for definitions.

The associated error which can be returned from parsing.
Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.