Struct term_transcript::PtyCommand
source · pub struct PtyCommand { /* private fields */ }
Available on crate feature
portable-pty
only.Expand description
Command to spawn in a pseudo-terminal (PTY).
Examples
Since shell spawning is performed in a generic way,
PtyCommand
can be used as a drop-in replacement for Command
:
let transcript = Transcript::from_inputs(
&mut ShellOptions::new(PtyCommand::default()),
vec![UserInput::command(r#"echo "Hello world!""#)],
)?;
// do something with `transcript`...
Implementations§
source§impl PtyCommand
impl PtyCommand
Trait Implementations§
source§impl Clone for PtyCommand
impl Clone for PtyCommand
source§fn clone(&self) -> PtyCommand
fn clone(&self) -> PtyCommand
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 ConfigureCommand for PtyCommand
impl ConfigureCommand for PtyCommand
source§impl Debug for PtyCommand
impl Debug for PtyCommand
source§impl Default for PtyCommand
impl Default for PtyCommand
source§impl SpawnShell for PtyCommand
impl SpawnShell for PtyCommand
§type ShellProcess = PtyShell
type ShellProcess = PtyShell
Spawned shell process.
source§fn spawn_shell(&mut self) -> Result<SpawnedShell<Self>>
fn spawn_shell(&mut self) -> Result<SpawnedShell<Self>>
Spawns a shell process. Read more
Auto Trait Implementations§
impl RefUnwindSafe for PtyCommand
impl Send for PtyCommand
impl Sync for PtyCommand
impl Unpin for PtyCommand
impl UnwindSafe for PtyCommand
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere T: Any,
§fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
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
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§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.§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.