#[non_exhaustive]pub struct SpawnOpts {
pub program: String,
pub socket: Option<String>,
pub session: Option<String>,
}Expand description
How to spawn the tmux -C control client. Default runs tmux -C new-session -A
(attach-or-create the default session) on the default server.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.program: StringThe tmux binary to run.
socket: Option<String>Server socket name for -L (isolation); None uses tmux’s default server.
session: Option<String>Session for -s (with new-session -A, attach-or-create); None leaves it unnamed.
Implementations§
Source§impl SpawnOpts
impl SpawnOpts
Sourcepub fn new() -> Self
pub fn new() -> Self
Start from the defaults (tmux -C new-session -A, default server). SpawnOpts
is #[non_exhaustive], so build it through these setters rather than a literal.
Sourcepub fn socket(self, socket: impl Into<String>) -> Self
pub fn socket(self, socket: impl Into<String>) -> Self
Run on a dedicated server socket (-L) — use this for test isolation.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SpawnOpts
impl RefUnwindSafe for SpawnOpts
impl Send for SpawnOpts
impl Sync for SpawnOpts
impl Unpin for SpawnOpts
impl UnsafeUnpin for SpawnOpts
impl UnwindSafe for SpawnOpts
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