pub struct PtyConfigBuilder { /* private fields */ }Expand description
Builder for PtyConfig.
Implementations§
Source§impl PtyConfigBuilder
impl PtyConfigBuilder
Sourcepub fn working_directory(self, path: impl Into<PathBuf>) -> Self
pub fn working_directory(self, path: impl Into<PathBuf>) -> Self
Set the working directory for the child process.
Sourcepub fn env_clear(self) -> Self
pub fn env_clear(self) -> Self
Set the complete environment for the child process.
This replaces the inherited environment entirely.
Sourcepub fn env(self, key: impl Into<OsString>, value: impl Into<OsString>) -> Self
pub fn env(self, key: impl Into<OsString>, value: impl Into<OsString>) -> Self
Add an environment variable.
Sourcepub fn env_remove(self, key: impl Into<OsString>) -> Self
pub fn env_remove(self, key: impl Into<OsString>) -> Self
Remove an environment variable.
Sourcepub const fn window_size(self, cols: u16, rows: u16) -> Self
pub const fn window_size(self, cols: u16, rows: u16) -> Self
Set the initial window size.
Sourcepub const fn new_session(self, value: bool) -> Self
pub const fn new_session(self, value: bool) -> Self
Set whether to create a new session.
Sourcepub const fn spawn_timeout(self, timeout: Duration) -> Self
pub const fn spawn_timeout(self, timeout: Duration) -> Self
Set the spawn timeout.
Sourcepub const fn controlling_terminal(self, value: bool) -> Self
pub const fn controlling_terminal(self, value: bool) -> Self
Set whether to use a controlling terminal (Unix only).
Trait Implementations§
Source§impl Clone for PtyConfigBuilder
impl Clone for PtyConfigBuilder
Source§fn clone(&self) -> PtyConfigBuilder
fn clone(&self) -> PtyConfigBuilder
Returns a duplicate 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 Debug for PtyConfigBuilder
impl Debug for PtyConfigBuilder
Source§impl Default for PtyConfigBuilder
impl Default for PtyConfigBuilder
Source§fn default() -> PtyConfigBuilder
fn default() -> PtyConfigBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PtyConfigBuilder
impl RefUnwindSafe for PtyConfigBuilder
impl Send for PtyConfigBuilder
impl Sync for PtyConfigBuilder
impl Unpin for PtyConfigBuilder
impl UnwindSafe for PtyConfigBuilder
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