pub struct NativePty { /* private fields */ }Expand description
Wrapper around the native PTY system.
Implementations§
Source§impl NativePty
impl NativePty
Sourcepub fn spawn(
&self,
shell: &str,
size: PtySize,
) -> Result<PtyHandle<Box<dyn Read + Send>, Box<dyn Write + Send>>>
pub fn spawn( &self, shell: &str, size: PtySize, ) -> Result<PtyHandle<Box<dyn Read + Send>, Box<dyn Write + Send>>>
Sourcepub fn spawn_default(
&self,
size: PtySize,
) -> Result<PtyHandle<Box<dyn Read + Send>, Box<dyn Write + Send>>>
pub fn spawn_default( &self, size: PtySize, ) -> Result<PtyHandle<Box<dyn Read + Send>, Box<dyn Write + Send>>>
Spawn a shell process with the default shell.
Sourcepub fn spawn_shell(
&mut self,
working_dir: Option<&Path>,
) -> Result<SpawnedShell>
pub fn spawn_shell( &mut self, working_dir: Option<&Path>, ) -> Result<SpawnedShell>
Spawn a shell process with optional working directory.
This is a convenience method for command execution that spawns a shell with default size and optionally sets the working directory.
Sourcepub fn spawn_command(
&mut self,
command_line: &str,
working_dir: Option<&Path>,
) -> Result<SpawnedShell>
pub fn spawn_command( &mut self, command_line: &str, working_dir: Option<&Path>, ) -> Result<SpawnedShell>
Spawn a command directly (non-interactive).
This runs a single command and exits when done.
The command is executed via sh -c "command" (Unix) or cmd /c command (Windows).
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for NativePty
impl !Sync for NativePty
impl !UnwindSafe for NativePty
impl Freeze for NativePty
impl Send for NativePty
impl Unpin for NativePty
impl UnsafeUnpin for NativePty
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.