pub struct Pty { /* private fields */ }Expand description
PTY helper backed by the sandbox process WebSocket runtime.
Implementations§
Source§impl Pty
impl Pty
Sourcepub async fn create(&self, opts: PtyCreateOptions) -> Result<CommandHandle>
pub async fn create(&self, opts: PtyCreateOptions) -> Result<CommandHandle>
Create an interactive shell PTY.
Sourcepub async fn connect(&self, pid: impl ToString) -> Result<CommandHandle>
pub async fn connect(&self, pid: impl ToString) -> Result<CommandHandle>
Connect to a running PTY by process id.
Sourcepub async fn send_stdin(
&self,
pid: impl ToString,
data: impl AsRef<[u8]>,
) -> Result<()>
pub async fn send_stdin( &self, pid: impl ToString, data: impl AsRef<[u8]>, ) -> Result<()>
Send input bytes to a PTY.
Sourcepub async fn send_input(
&self,
pid: impl ToString,
data: impl AsRef<[u8]>,
) -> Result<()>
pub async fn send_input( &self, pid: impl ToString, data: impl AsRef<[u8]>, ) -> Result<()>
Send input bytes to a PTY.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Pty
impl !UnwindSafe for Pty
impl Freeze for Pty
impl Send for Pty
impl Sync for Pty
impl Unpin for Pty
impl UnsafeUnpin for Pty
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