pub struct PtyProcess {
pub master_fd: RawFd,
pub pid: Pid,
pub socket_path: PathBuf,
/* private fields */
}Fields§
§master_fd: RawFd§pid: Pid§socket_path: PathBufImplementations§
Source§impl PtyProcess
impl PtyProcess
Sourcepub fn spawn_new_detached(session_id: &str) -> Result<Session>
pub fn spawn_new_detached(session_id: &str) -> Result<Session>
Spawn a new detached session
Sourcepub fn spawn_new_detached_with_name(
session_id: &str,
name: Option<String>,
) -> Result<Session>
pub fn spawn_new_detached_with_name( session_id: &str, name: Option<String>, ) -> Result<Session>
Spawn a new detached session with a custom name
Sourcepub fn attach_to_session(session: &Session) -> Result<Option<String>>
pub fn attach_to_session(session: &Session) -> Result<Option<String>>
Attach to an existing session
Sourcepub fn run_detached(self) -> Result<()>
pub fn run_detached(self) -> Result<()>
Run the detached PTY handler
Sourcepub fn kill_session(session_id: &str) -> Result<()>
pub fn kill_session(session_id: &str) -> Result<()>
Kill a session by its ID
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PtyProcess
impl RefUnwindSafe for PtyProcess
impl Send for PtyProcess
impl Sync for PtyProcess
impl Unpin for PtyProcess
impl UnwindSafe for PtyProcess
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more