pub struct DetachClient<'a> {
pub all: bool,
pub parent_sighup: bool,
pub shell_command: Option<Cow<'a, str>>,
pub target_session: Option<Cow<'a, str>>,
pub target_client: Option<Cow<'a, str>>,
}
Expand description
Structure for detaching the current client
§Manual
tmux ^2.4:
detach-client [-aP] [-E shell-command] [-s target-session] [-t target-client]
(alias: detach)
tmux ^2.2:
detach-client [-aP] [-s target-session] [-t target-client]
(alias: detach)
tmux ^1.5:
detach-client [-P] [-s target-session] [-t target-client]
(alias: detach)
tmux ^0.8:
detach-client [-t target-client]
(alias: detach)
Fields§
§all: bool
[-a]
- kill all but the client client given with -t
parent_sighup: bool
[-P]
- send SIGHUP to the parent process of the client, typically causing it to exit
shell_command: Option<Cow<'a, str>>
[-E shell-command]
- run shell-command to replace the client
target_session: Option<Cow<'a, str>>
[-s target-session]
- specify the session, all clients currently attached
target_client: Option<Cow<'a, str>>
[-t target-client]
- specify the client
Implementations§
source§impl<'a> DetachClient<'a>
impl<'a> DetachClient<'a>
pub fn new() -> Self
sourcepub fn parent_sighup(self) -> Self
pub fn parent_sighup(self) -> Self
[-P]
- send SIGHUP to the parent process of the client, typically causing it to exit
sourcepub fn shell_command<S: Into<Cow<'a, str>>>(self, shell_command: S) -> Self
pub fn shell_command<S: Into<Cow<'a, str>>>(self, shell_command: S) -> Self
[-E shell-command]
- run shell-command to replace the client
sourcepub fn target_session<S: Into<Cow<'a, str>>>(self, target_session: S) -> Self
pub fn target_session<S: Into<Cow<'a, str>>>(self, target_session: S) -> Self
[-s target-session]
- specify the session, all clients currently attached
sourcepub fn target_client<S: Into<Cow<'a, str>>>(self, target_client: S) -> Self
pub fn target_client<S: Into<Cow<'a, str>>>(self, target_client: S) -> Self
[-t target-client]
- specify the client
pub fn build(self) -> TmuxCommand<'a>
Trait Implementations§
source§impl<'a> Clone for DetachClient<'a>
impl<'a> Clone for DetachClient<'a>
source§fn clone(&self) -> DetachClient<'a>
fn clone(&self) -> DetachClient<'a>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<'a> Debug for DetachClient<'a>
impl<'a> Debug for DetachClient<'a>
source§impl<'a> Default for DetachClient<'a>
impl<'a> Default for DetachClient<'a>
source§fn default() -> DetachClient<'a>
fn default() -> DetachClient<'a>
Returns the “default value” for a type. Read more
source§impl<'a> From<DetachClient<'a>> for TmuxCommand<'a>
impl<'a> From<DetachClient<'a>> for TmuxCommand<'a>
source§fn from(item: DetachClient<'a>) -> Self
fn from(item: DetachClient<'a>) -> Self
Converts to this type from the input type.
source§impl<'a> Hash for DetachClient<'a>
impl<'a> Hash for DetachClient<'a>
source§impl<'a> Ord for DetachClient<'a>
impl<'a> Ord for DetachClient<'a>
source§fn cmp(&self, other: &DetachClient<'a>) -> Ordering
fn cmp(&self, other: &DetachClient<'a>) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl<'a> PartialEq for DetachClient<'a>
impl<'a> PartialEq for DetachClient<'a>
source§fn eq(&self, other: &DetachClient<'a>) -> bool
fn eq(&self, other: &DetachClient<'a>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'a> PartialOrd for DetachClient<'a>
impl<'a> PartialOrd for DetachClient<'a>
source§fn partial_cmp(&self, other: &DetachClient<'a>) -> Option<Ordering>
fn partial_cmp(&self, other: &DetachClient<'a>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl<'a> Eq for DetachClient<'a>
impl<'a> StructuralPartialEq for DetachClient<'a>
Auto Trait Implementations§
impl<'a> RefUnwindSafe for DetachClient<'a>
impl<'a> Send for DetachClient<'a>
impl<'a> Sync for DetachClient<'a>
impl<'a> Unpin for DetachClient<'a>
impl<'a> UnwindSafe for DetachClient<'a>
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